Home   Help Search Login Register  

Author Topic: Making BLUFOR AI shoot at spawned civilians that joined OPFOR?  (Read 914 times)

0 Members and 1 Guest are viewing this topic.

Offline laggy

  • Members
  • *
  • "Behold a pale horse"
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
And I looked and beheld a pale horse and his name that sat on him was Death and Hell followed with him.

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
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;
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...