Pages: 1
Topic closed
I'm currently using the glide ___ secs to x__ y__ to have my 'player' sprite move to my mouse pointer when I click the stage.
It works great.
Now I want to add walls to 'block' the player's movement. Is there any way to interrupt the "glide to" command to perform collision detection?
My current thinking is a hack. Instead of having the sprite glide all the way to the mouse pointer, have it glide one pixel at a time, and do my collision detection one pixel at a time, possibly using the repeat until command(?).
While I think this would work, it seems like a HUGE lag would occur.
There has to be a better option.
Thanks!
My STAGE script:
<when[ STAGE ]clicked>
<broadcast[ glideToMousePointer ]>
My PLAYER_SPRITE script:
<when I receive[ glideToMousePointer ]>
<glide( 1 )secs to x <mouse x> )y
<mouse y> )>
Last edited by infinitum3d (2010-05-27 17:36:30)
Offline
Hmmmm.... Ok, thanks Coolstuff! I'll have to figure out a workaround then. Something to replace "Glide to". . .
Offline
Topic closed
Pages: 1