Jump to content
Sign in to follow this  

Recommended Posts

I have a unit being controlled by a script that is in a loop, how do i at a certain point make the unit stop folling the script, im guessing its something to do with the 'end' line in the script.

This is my code

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

#HERE

this is the action i have looping

~1/8

goto "HERE"

end

what Im after is how to fast forward to the end line!

taa

Share this post


Link to post
Share on other sites

at what point do you want it to end? after a certain time or a certain action/condition?

for time it would be like ==>

--------------------------------------

_a = 0

_b = 5               ;how many seconds too run the loop

_c = 0.125         ;delay

_d = _b / _c       ;number of times too loop

#HERE

this is the action i have looping

_a = _a + 1

~_c

? (_a >= _d): goto "end"

goto "HERE"

#end

exit

------------------------------------

btw avoid stuff like 1/8, it is just an unessessary calculation for the script to do.

for a condition to end it ==>

----------------------------------

#HERE

this is the action i have looping

~0.125

? (condition is true): goto "end"

goto "HERE"

#end

exit

-------------------------------------

smile_o.gif your welcome

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×