Home   Help Search Login Register  

Author Topic: Respawning non-playable AI  (Read 7075 times)

0 Members and 1 Guest are viewing this topic.

Offline norrin

  • Tutorial Writer
  • **
Respawning non-playable AI
« on: 14 Jul 2009, 06:08:50 »
AI respawn scripts

Description
A range of scripts that allow you to respawn non-playable AI soldiers and vehicles that will move off and patrol areas.  The scripts allow you to minimise the number of units on the map at any time and hopefully reduce mission lag. The respawning AI units are created as the same type, with the same loadout as they started the mission with and their skill is set to the same level as set in the editor. Also in the test mission the player is setCaptive true so the enemy units will not shoot him.

Individually respawning AI that move via doMove commands.
http://www.norrin.org/downloads/ArmA2/AI_respawn/AI_respawn_WP_test.utes.rar

Group respawning AI that move via waypoints
http://www.norrin.org/downloads/ArmA2/AI_respawn/AI_respawn_WP_grp.utes.rar

Group respawning AI that patrol an area using Kronzky's UPS
http://www.norrin.org/downloads/ArmA2/AI_respawn/aiRespawnUPS.Chernarus.rar

Respawning AI vehicles that move via waypoints
http://norrin.org/downloads/ArmA2/AI_respawn/AIvclRespawn_WP.utes.rar

Respawning AI vehicles that patrol an area using Kronzky's UPS
http://www.norrin.org/downloads/ArmA2/AI_respawn/AIvclRespawn_UPS.utes.rar

Instructions for using each script are contained in the rar files.
« Last Edit: 17 Jul 2009, 01:36:25 by norrin »

Offline loki72

  • Former Staff
  • ****
    • Loki's Nightmare
Re: Respawning non-playable AI
« Reply #1 on: 17 Jul 2009, 00:13:50 »
just messed with a couple of these.. and will continue with the rest.

great job!

nice to have all these as demos for use as templates.

 :)

Offline norrin

  • Tutorial Writer
  • **
Re: Respawning non-playable AI
« Reply #2 on: 17 Jul 2009, 01:44:13 »
Please let me know if you can think of any other permutations Loki and I'll add them. 

I've been using them quite a bit myself over the last few days and I'm finding they allow you to give the players a consistent challenge without the enemies becoming too overwhelming.

Offline cheesus

  • Members
  • *
Re: Respawning non-playable AI
« Reply #3 on: 10 Aug 2009, 13:05:20 »
Hi, these are realy useful scripts but im having trouble stopping the respawing of ai with a trigger, whenever i mess with the code it seems to stop any respawning after 2 times, any suggestions for best way to stop the respawning after a trigger is activated?

Also with the waypoint script i've been able to make an ai use a static gun by using setwaypointtype"GETIN NEAREST"; however after he's killed & respawns he refuses to use that static gun again and runs around the area & will get into anything BUT the gun i want him to use. Some help here would alo be awesome too :)

Offline Barbolani

  • Members
  • *
Re: Respawning non-playable AI
« Reply #4 on: 11 Aug 2009, 11:36:08 »
@cheesus

Maybe you could try modifying the line where the script checks for dead units and Unassigning vehicles to them...

@norrin

Just what I needed, THANK YOU!!!
« Last Edit: 11 Aug 2009, 11:38:46 by Barbolani »

Offline cheesus

  • Members
  • *
Re: Respawning non-playable AI
« Reply #5 on: 11 Aug 2009, 22:57:44 »
@Barbolani well ive managed to acheive what i wanted to by using a variable in a trigger to set _lives to zero, does the job but i dunno if its the most elegant way of stopping the respawn script :)

now im stuck tying to trigger multiple 'instances' of these events at different points in a mission.

Offline CaptainBravo

  • Members
  • *
Re: Respawning non-playable AI
« Reply #6 on: 25 Aug 2009, 14:07:10 »
@norrin : Great scripts!! I use them in most missions.

Only variations that would be helpful is the sppawn planes Flying in air. That has proven a bit tricky so far (for me anyway)

Thanks for great scripts!