I think it would be a good idea to put in script numbering. that way you could have a block like
[blocks]
<stop script>#:
or for external sprites(a script to stop a script of another sprite)
<stop script>#: Sprite:
[/block]
Just two ideas for the use of script numbering, but there are probably thousands.
Offline
Is anybody going to look?
Offline
you can accomplish the same thing with existing blocks. I have never used the blocks in a forum, so forgive me if it looks bad...
<repeat until><( <=> )>0
do stuff here...
<end>
then when you want the script to stop, you set the variable to zero from anywhere in your program.
Offline
<repeat until><(variable <=> 0 )>
Offline
yeah but it wold be much easier to do what i said. plus thats just one use of script numbering.
Offline
I'm trying to understand if you are using those blocks, why not just put them in the script they are supposed to stop?
Offline
was that question for me Bluestribute? That is myu suggestion to put the blocks i listed in the script you want to stop.
Offline
the_guardian wrote:
was that question for me Bluestribute? That is myu suggestion to put the blocks i listed in the script you want to stop.
Just this general topic of stopping a script, but why not just put the stop script in the actual script?
Offline
I like this suggestion Alan Projects.
Guardian is right his method would work but their are some examples where it wouldn't. eg inside a repeat (10) you would need an extra if variable=0. It would also continue to the end of the list of things to repeat and not stop as soon as the variable=0.
I would also like a stop sprite command.
Offline
good point bigB, if you had a large loop you would have to wait for the loop to end before it checked the variable to stop. I actually use the methos i descibed so my controller scripts know when my game is over.
Offline
bigB wrote:
I like this suggestion Alan Projects.
Guardian is right his method would work but their are some examples where it wouldn't. eg inside a repeat (10) you would need an extra if variable=0. It would also continue to the end of the list of things to repeat and not stop as soon as the variable=0.
I would also like a stop sprite command.
Exactly variables start getting annoying because what if you want to start a script again? you could do that with script numbering and extra blocks! two huge lines and an unnecessary variable avoided.
Offline