Jump to content
Sign in to follow this  
Joe Miller

NEEDED: Simple AI spawn script

Recommended Posts

I need a simple script to make a ai units spawn in a bunker each 10 seconds and join a certain group. I need also to stop the spawning of ai when a certain unit is destroyed. That's what i need: i've looked for scripts in ofpec but they are all complicated (patrols, multiplespawn etc) , i need just a simple spawn script.

Share this post


Link to post
Share on other sites

Since noone was able to help me i tried and tried and now i managed to do something that seems good:

;---Cattura Variabili---

_unit = _this select 0

_pos = _this select 1

_group = _this select 2

_init = _this select 3

_uff = _this select 4

;---Creazione unitŕ---

#loop

? !(alive _uff): goto "exit"

_unit createUnit [getmarkerPos _pos,_group]

~10

;---Riinizio dello script

goto "loop"

;--- Fine dello script---

#exit

exit

Share this post


Link to post
Share on other sites
What's that do when group is full?

... nothing.

[nameofspawnedunit] join grpnull? confused_o.gif

Share this post


Link to post
Share on other sites
Nope, it doesn't spawn unit when group is full.

the group wont get full if every unit joins a new group after being spawned wink_o.gif

Share this post


Link to post
Share on other sites

Oh sorry I misunderstood you. That way the limit would be grouplimit, 63 per side or so. Minus the groups elsewhere in the mission of course. I wonder what happens when that limit's reached.

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  

×