I made this project thats ment to rotate a sprite AND glide to a location if the sprite isnt in that location. the gliding works fine, but the rotating wont stop at all. Infact, either script stops running when the sprite reaches the location I want it to. Heres the script im running now:
[blocks]
<when green flag clicked>
<if><< <not> <<<( <x position> <=> -38 )> <and><( <y position> <=> 1 )> >>>>
<repeat until><<<( <x position> <=> -38 )> <and><( <y position> <=> 1 )> >>
[/blocks]
I dunno why it wont stop.
Last edited by DigiTechs (2011-08-14 15:16:00)
Offline
After the repeat until, you have to tell it to stop. It knows to keep repeating until the sprite gets to where you want it to get to, but it doesn't know what to do after it gets there.
Offline
Instead of using repeat until, try using forever if.
Sorry, I haven't quite worked out how to actually put the scipt in like you did, but it would look something like this:
Forever if not x position = -38 and not y position = 1
Glide 3 secs to x: -38 y: 1
Turn right 5 degrees
Obviously you can change the numbers so it glides slower or faster, and you can change how much in turns.
Offline