Jump to content
Sign in to follow this  
Rhod747

Randomly spawning AI groups

Recommended Posts

Hi, I'm having another problem with the eden editor. I have 4 points set up to defend on an airfield. I've made it so enemies entering the area are detected and it sends a hint to the player to go defend that point. All good, until I get to actually spawning the AI.

 

My problem is, I don't want to spawn multiple groups at the same time as this will be too difficult (distance too great etc) and I don't want them to just respawn in a predictable amount of time.

 

I want to be able to create four spawn points for these enemies (Ryan's zombies), have only one activate at any one time and a delay before the next lot of AI spawn in, have the AI follow a waypoint towards its specific 'barricade' on the map and then the spawner 'reset' itself with a random time before the next wave starts. I've been looking for hours and haven't been able to find anything that specifically does something like this and have no idea how or if scripting it is possible.

 

Any help is greatly appriciated, thanks in advance :)

Share this post


Link to post
Share on other sites

My problem is, I don't want to spawn multiple groups at the same time as this will be too difficult (distance too great etc) and I don't want them to just respawn in a predictable amount of time.

 

Hi Rhod747, you could use a trigger to launch the spawn waves:

 

1. Place the basic trigger (no area) in Eden editor.

2. Change the trigger attributes to:

  • Repeatable: yes
  • Condition: time > player getVariable ["wave", 2]
  • Activation: systemChat str(time); player setVariable ["wave", time + 2 + random 4]

Experiment with the above to get the idea, then replace systemChat str(time) with the command to actually launch your spawn script, for example, 0 = execVM "zombie.sqf"

 

Nikander

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  

×