Author: Nomadd
Author Website:

Requirements: No addons required

Version: 2.2

Short description: I have made this script to be pretty flexible and allow the mission maker(me) to be able to do quite a few things.

Date: 2013-03-29 07:37


Comments: (0)
Rating:



 



SLP_Spawing script

by
Nomadd


Description:
I have made this script to be pretty flexible and allow the mission maker(me) to be able to do quite a few things.
You can use this to spawn units and/or vehicles and have them patrol, defend, attack, hunt the players group and lots more.


Usage:
The included demo requires the Community Base Addons. I recommend using CBA for the tasks, but you can change the tasks and SLP_spawn will NOT be dependent on CBA.
!!Important!! With this script do not use CBA and Bis Task functions together, they will not work

More info about how to use this in your own missions can be found in the readme file!


Arma 3 version available::
The SLP Spawning script was also released for Arma 3! You can get it from here: SLP Spawning script


Credits:
- BIS
- Shuko ... I am using his SHK_pos.sqf to find the spawn locations. I have not altered it in anyway , full credits go to Shuko for this script. I am also using his SHK_buildingpos.sqf script as an example of what can be added to the SLP_tasks.sqf for the spawned groups to preform, again full credit to Shuko for his script.
- CBA and it creators
- Silola for creating DAC , got alot of ideas from there
- all the folks at the BI forums who have taken the time to answer questions and provide help


Changelog:
v2.2
- various changes
- fixed armor not spawning crew but just regular units
- added _boat array in SLP_units_config. You can now spawn boats.

v2.1
- Major code change. The script now use functions to accomplish the actual spawning. Meaning you can spawn units,vehicles,armo,aircraft from the same script call at the same time. They use to spawn in order. When one was done the next would spawn units>>Vehicles>>armor>>aircraft. That is no longer an issue.
- cleaned up alot of code, made quite a few of my own functions to make things smoother
- Stopped using BIS_fnc_selectrandomnumber. It was not doing what I thought. Made my own fnc to get random numbers.
- fixed the skill settings. they were not being applied to spawned units/vehicles.
- the script is no longer CBA dependent. The demo mission is CBA dependent, but it is easily changed. The tasks just need to be replaced with something else.
- burydead param in SLP_init, can set the delay a until units sink into ground and is deleted, only works on units spawned by SLP.
- Groups are deleted once all units are dead
- fillcargo param in SLP_init. Vehicles and Armor can now have empty cargo positions filled with units(only works on vehicles and armor with cargo positions). You can set the percentage of seats you want filled 0=none,1=full. .5 would be 50% full or [.25,.75] will fill 25-75% of the empty cargo positions.
- seperated the _air array in units configs into _helo and _plane, now you can choose which type you want to randomly spawn, Default is helo.
- streamlined the debug hints to help find any problems
- updated readme

v1.3
- added boolean, you can set delay in secs or set it as true. If set as true another group will not spawn until the first group is completely killed

v1.2
- minor changes to markers when debugging mission
- SLP_task: "attack" can now have a single destination to attack or can be an array of destinations. If it is an array a random destination will be picked
EXP: ,["attack","atkmark1"] spawn SLP_Spawn; ,["attack",["atkmark1","atkmark2","atkmark3"]] spawn SLP_Spawn
- small change to the way the number of groups created is counted

v1.1
- debug markers are now local
- fixed a small bug with debug marker not updating correctly when using the "hunt" task
- changed "attack","patrol" and "hunt" tasks so now units will search nearby houses
- "hunt" task will now work with groups or objects. just have to name them
- few other small changes


Forum topic:
- BI forums



- Community Base Addons (only for the included demo mission! Not required for the script itself!)




Enable javascript to be able to download from Armaholic please!



Tags: Spawn