Page 1 of 1

[solved'How do I go about make table collision

Posted: Thu Dec 05, 2013 10:02 pm
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?

Re: How do I go about make table collision

Posted: Thu Dec 05, 2013 10:23 pm
by get52
Someone please help me, I hate to be a bumping asshole but, yeah.

Re: How do I go about make table collision

Posted: Thu Dec 05, 2013 10:31 pm
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.

Re: How do I go about make table collision

Posted: Thu Dec 05, 2013 10:34 pm
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.

Re: How do I go about make table collision

Posted: Thu Dec 05, 2013 10:36 pm
by MPQC
From the info you've given us...

If (table[x+1] == 1) then
player has hit a 1
end

Re: How do I go about make table collision

Posted: Thu Dec 05, 2013 10:39 pm
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.