[solved'How do I go about make table collision

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
get52
Prole
Posts: 36
Joined: Wed Sep 04, 2013 1:53 pm

[solved'How do I go about make table collision

Post by get52 »

Basically i have a square (player) and the level witch is just a table [example]
[0,0,0,0]
[0,0,1,0]
[1,1,1,1]
I want to be able to detect when the play is walking into a one. what is the simplest way to go about doing this?
Last edited by get52 on Thu Dec 05, 2013 10:39 pm, edited 1 time in total.
Only douchebags tell the admins to delete threads once they get they're answer. :awesome:
get52
Prole
Posts: 36
Joined: Wed Sep 04, 2013 1:53 pm

Re: How do I go about make table collision

Post by get52 »

Someone please help me, I hate to be a bumping asshole but, yeah.
Only douchebags tell the admins to delete threads once they get they're answer. :awesome:
User avatar
veethree
Inner party member
Posts: 877
Joined: Sat Dec 10, 2011 7:18 pm

Re: How do I go about make table collision

Post by veethree »

We need more information to be able to help you. Is your player gridlocked? If you have a .love of your progress so far, Uploading that would really help us help you.
get52
Prole
Posts: 36
Joined: Wed Sep 04, 2013 1:53 pm

Re: How do I go about make table collision

Post by get52 »

veethree wrote:We need more information to be able to help you. Is your player gridlocked? If you have a .love of your progress so far, Uploading that would really help us help you.
Theres not very much to show you, its just a square so far that has love.keypress then x = x + 1 and a table.
and its not gridlocked
I just wanna know if hardoncollider would be good for this and how i would go about doing that :P

So I can detect it and tell the player to stop.
Only douchebags tell the admins to delete threads once they get they're answer. :awesome:
User avatar
MPQC
Citizen
Posts: 65
Joined: Fri Jun 28, 2013 2:45 pm

Re: How do I go about make table collision

Post by MPQC »

From the info you've given us...

If (table[x+1] == 1) then
player has hit a 1
end
get52
Prole
Posts: 36
Joined: Wed Sep 04, 2013 1:53 pm

Re: How do I go about make table collision

Post by get52 »

MPQC wrote:From the info you've given us...

If (table[x+1] == 1) then
player has hit a 1
end
Wonderfull, i was gonna start on it but i had no idea, this gives me an idea of what to do. Thanks.
Only douchebags tell the admins to delete threads once they get they're answer. :awesome:
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 5 guests