OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting Multiplayer => Topic started by: Lonestarranger on 11 Jul 2012, 20:44:32

Title: Spawn Playable AI Squad
Post by: Lonestarranger on 11 Jul 2012, 20:44:32
Am new to editing. Is there a way to spawn an entire AI group like a squad or a tank platoon that has playable positions?   I know there are scripts to spawn an AI non playable group, but any way to do it with all or some positions in the group playable? 
Title: Re: Spawn Playable AI Squad
Post by: h- on 12 Jul 2012, 08:45:59
Welcome to OFPEC :welcome:

However, unfortunately on your first day you have violated our rules and posted this same thread at two different boards, which is not allowed. :cop:

So that I can lock the 'correct' duplicate thread, for which game you want this information on, Arma 1 or 2?
Title: Re: Spawn Playable AI Squad
Post by: Lonestarranger on 12 Jul 2012, 22:33:52
Meant ARMA2, but posted in wrong place.  Did not know how to delete the wrong one. 
Title: Re: Spawn Playable AI Squad
Post by: h- on 14 Jul 2012, 19:58:01
Ok. Best course of action in a case like that is to use the 'report to moderator' link that is located in the bottom of the post and ask the thread to be moved. But no harm done :)


As for the question at hand, I think setPlayable (http://www.ofpec.com/COMREF/index.php?action=details&id=736&game=All) is most likely the scripting command you need.
Title: Re: Spawn Playable AI Squad
Post by: Worldeater on 16 Jul 2012, 23:02:03
You could use the BIS_fnc_spawnGroup (http://community.bistudio.com/wiki/BIS_fnc_spawnGroup) function (which is provided by BI's Function Library (http://community.bistudio.com/wiki/Functions_Library)) and use "setPlayable" on certain/all units after it has spawned the group.
Title: Re: Spawn Playable AI Squad
Post by: h- on 17 Jul 2012, 17:38:39
Or alternatively you can find the same stuff here at OFPEC (http://www.ofpec.com/COMREF/index.php?action=read&id=231#spawngroup) instead of the Biki ;)