OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: _Ross_ on 17 Jun 2003, 19:45:25
-
I know this sound really dumb, but could someone tell me how to make loops stop? I cant find a TUT
Thanks ;D
-
do u mean in a script?
then add a condition into the loop which searches for a variable:
#loop
bla
bla
bla
? endloop : exit
goto "loop"
the condition is endloop so when in ur mission u want the loop to end, then make endloop = true...
in the current format it will exit the script entirely - if u want it to move onto the next part of the script use:
#loop
bla
bla
bla
? endloop : goto "next"
goto "loop"
#next
more bla bla bla
hope that helps u out...
-
???what?
Im tryin to make a loop where averytime it happens, a counter adds one to itself would this work?
#loop
something
something
something
ctr = ctr + 1
? endloop: Ctr = 30
Goto #loop
-
not sure what ur getting at.... do u want a loop to end after a certain number of times?
then use:
#loop
something
something
something
_ctr = _ctr + 1
? (_ctr == 30) : exit
Goto #loop
that will exit the script.... the : is the same as the 'on activation' of a trigger
-
thanks thats what i was getting at