ID:169053
Aug 1 2005, 7:38 pm
|
|
How would I make it so if someone moves like pressing right itll continue going right untill it hits something or theres a direction change.
|
You could try something like this:
client I put the movable check in, because if they moved again while they were already automatically moving, it'd be running two KeepMoving()s. You could also stop the moving in Bump(), but then it wouldn't take hitting the edge of the map into account. <edit> I just realized I failed to take moving a different way into account, I'll work on that in a second. <edit> Ok, it's fixed. I dunno if this is efficient, but it works. <edit> Here's another way you could do it, keeping the movable var: client |
Look up client/East+West+North+South() (thats 4 different procs by the way) and mess around there.
|
In response to DeathAwaitsU
|
|
I think you mean East() and West() there? =P
|
In response to Artekia
|
|
Oh yeah -_-
|
In response to DeathAwaitsU
|
|
Would you happen to know if my way of doing it is an efficient way? Just wondering out of curiosity.
|
In response to Artekia
|
|
Yeah in my opinion it is efficient, but I'm not sure it's the most robust. I myself can't provide a more robust one but someone else probably can.
|
In response to DeathAwaitsU
|
|
*THINK* No Garantees.