Home   Help Search Login Register  

Author Topic: (Patrol)SpawnManager2  (Read 1860 times)

0 Members and 1 Guest are viewing this topic.

Offline DrStrangelove

  • Members
  • *
  • Mr.Creative
(Patrol)SpawnManager2
« on: 18 Oct 2003, 18:54:20 »
Did a lot of research with AI respawns and came up with my new spawn manager. Uploaded into the depot("Units and groups"), it's pending atm:

http://www.ofpec.com/editors/resource_view.php?id=585

Readme.txt
------------------
SPAWN MANAGER 2
2003 by ])rStrangelove
Spawns a group and issues orders

New/special features:
 - Many parameters optional, can create general or very specific groups & behaviour.
 - Respawns can either happen: never, specific amount or forever
 - Respawns don't switch groups anymore, only 1 specific group used all the time
 - Respawn script works for EAST and WEST.
    (You could let 2 SpManagers fight against each other !)
 - Troop types in seperate section, easy to customize. See "troops2use" at bottom of script.
    (Templates included for Original OPF, SEB Vietnam, Invasion44 and BAS-Tonal-troops. Mixed fights with different troops possible (US Nam grunts VS. Tonal africans))
 - All running SpawnManagers will collect spawn groups in the global arrays:
   "eastpatrolteams" and "westpatrolteams" for ease of reference.
 - Spawnposition and Patrolposition don't need to be the same anymore.
 - Dead soldiers slowly sink into the ground after 11+ seconds.
    (it's not a feature, it's an important bug solver)  ;)
 - If allowed, wounded group leaders call long range artillery on enemy positions
    (see init.sqs)
 - If spawn object name is given, group respawn is dependant on object's health.
    (good for assigning a tent or building; destroying it will also stop respawns. it's possible to assign vehicles as spawn objects. If vehicles are too fast / too high, soldiers will get hurt/fall to death.)

=================================================================================

SHORTEST EXAMPLE---------------------------
["east","",getpos tent] exec "spawnman.sqs"

 5 russians are spawned at tent, will start patrolling 150m around tent.
 If all 5 are dead, they will respawn 1 time, but that's it.
 (these defaults can be changed in the "get parameters" start section)

SPECIFIC EXAMPLE---------------------------
["west","BAS_Deltas",getpos tent,8,150,20,-1,4,getpos house,tent] exec "spawnman.sqs"

 Parameter   Values allowed      Explanation
 (0)       "east" or "west"   what side is used ?
 (1)      "1985","vietnam",etc   what troops are spawned ? see bottom section
 (2)      [x,y,z],getpos <obj>   base position where troops are spawned
 (3) optional   2 - 12         how many soldiers are in group ?
 (4) optional   1 - 99999 (whatever)   patrol radius around patrolposition in m
 (5) optional   1 - 99999 (whatever)   how many seconds group will pause between patrols
 (6) optional   -1,0,1 - 99999      how many respawns ? -1 = infinite, 0 = no respawns
 (7) optional   2 - 12         how many dead in a group to trigger a respawn ?
 (8) optional   [x,y,z],getpos <obj>   patrolposition that is patrolled around
 (9) optional  spawn-<object>      object that "spawns" troops. destroying it will stop respawns
 NOTE: if parameter 9 is given (spawn-object), parameter 2 (spawn-position) won't be used.

 8 Deltas (BAS troops) are spawned at tent, will start patrolling 150m around house. They will pause for 20 seconds at each patrol point. Everytime 4 Deltas have been killed, these 4 Deltas will respawn (respawns are infinite). If tent is destroyed, respawns will come to a complete halt. However, the script does continue and will resume where it halted in case the tent is "repaired" somehow later on.

Other examples can be found in the Templates for various mods. The demo mission on Tonal shows how to use a helicopter as a moving spawn base.

Send comments to _Darth_Vader_@web.de
Have fun !  8)

Offline DrStrangelove

  • Members
  • *
  • Mr.Creative
Re:(Patrol)SpawnManager2
« Reply #1 on: 18 Oct 2003, 19:11:28 »
Forgot:

Fire FX and smoke script by the great mapfact-team ! (www.mapfact.net) Visit their forum !  ;D