OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: rOk on 26 Jul 2004, 10:40:29

Title: Counting spawns
Post by: rOk on 26 Jul 2004, 10:40:29
Hi again.

I'm interested "spawn counting" namely how to spawn a group for let's say 10 times and then stop.
Thanks
Title: Re:Counting spawns
Post by: Zombie on 26 Jul 2004, 12:35:41
spawning an ai group or a player group?
for ai try this:
?!(local server):goto "end"
_gs=1
#groupspawn
 "soldierwb" createunit [getmarkerpos "barracks", group alpha]
_gs=_gs+1
?(_gs>=11)goto:"end"
goto "groupspawn"
#end
exit

all off the top of my head, untested, but should be ok.....
Title: Re:Counting spawns
Post by: rOk on 26 Jul 2004, 12:45:39
Thanks for the quick reply.

*grabs editor by the pants*  ;D
Title: Re:Counting spawns
Post by: rOk on 27 Jul 2004, 15:38:02
Hey Zombie

Your idea returns this:
Code: [Select]
/#/goto error unknown operator goto
Any thoughts?
Title: Re:Counting spawns
Post by: Zombie on 27 Jul 2004, 18:46:58
yep, I see it.  
the line ?(_gs>=11)goto : "end"
SHOULD BE
?(_gs>=11):goto "end"

sorry for the typo