OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: laggy on 09 Mar 2008, 14:18:14

Title: Making BLUFOR AI shoot at spawned civilians that joined OPFOR?
Post by: laggy on 09 Mar 2008, 14:18:14
Hi all.

I'm working on a script that will spawn armed civilians that join OPFOR side. I do that through this command: _unit = OPFORgroup createUnit ["Civilian", _startposition, [], 0, "FORM"].
The OPFORgroup is initialized through an OPFOR rifleman that is deleted at start of mission. This is to have a group to fill, but no units in it until the script kicks in.

I have just run into a problem.

If you group civilians with an OPFOR leader in the editor, the BLUFOR will treat those civilians as enemies. Same thing if you change their side by adjusting the text in mission.sqm.
When civilians are spawned on the other hand, the BLUFOR AI seems to refuse treating them as enemies even though they belong to an OPFOR group. Is there any way to fix this?
As my script works now, the civilians are picking off BLUFOR units like crazy, while BLUFOR don't even defend themselves.

Cheers

Laggy
Title: Re: Making BLUFOR AI shoot at spawned civilians that joined OPFOR?
Post by: johnnyboy on 10 Mar 2008, 05:07:46
After the civs spawn, try having them join opfor.  The opfor can be an opfor unit that was created in the editor with a probability of presence set to zero.

[civ1, civ2] join opforDude;