Pages: 1
Topic closed
i have a script
[blocks]
<when green flag clicked>
<forever if><touching[ mouse pointer
<broadcast[ to field
<wait until> <not> <touching[ mouse pointer >>
<forever if> <( <{ Arrow Clicked }> <=> 1 >
<set{ Arrow Clicked }to( 0 )
<stop script>
[/blocks]
yet in an identical script for another sprite, when the variable changes it does not stop the script
HELP
Last edited by hp001 (2008-04-23 06:33:53)
Offline
hmmm. Are you sure you made the script correctly. I made two sprites with that exact script and they both stopped perfectly.
Last edited by Jacobo (2008-04-23 06:42:13)
Offline
Instead of
<forever if><( <{ arrow clicked }> <=> 1 )>
<set{ arrow clicked }to( 0
<stop script>
<end>
you could do
<repeat until><( <{ arrow clicked }> <=> 0 )>
<if>> <( <{ arrow clicked }> <=> 1 )>
<set{ arrow clicked }to( 0
<stop script>
<end>
Offline
yeah thats all good but the thing is there are 2 similar scripts running simultaniously. when the condition is met one stops but the other 1 continues. it happens to be the point where
[blocks]
<forever if><( <{ Arrow Clicked }> <=> 1 )>
<set{ Arrow Clicked }to( 0
<stop script>
[/blocks]
and then one script stops when that initial condition is met but the other 1 continues. Even though there are 2 similar scripts running, the above part is common to both scripts so when i move on and place my mouse on the other sprites original location before it was told to hide, it broadcasts the same message as if it was still there and that changes the way the game works.
Last edited by hp001 (2008-04-24 03:45:47)
Offline
Topic closed
Pages: 1