Home   Help Search Login Register  

Author Topic: Causing units to switch sides  (Read 2357 times)

0 Members and 1 Guest are viewing this topic.

Offline zonker3210

  • Members
  • *
Causing units to switch sides
« on: 23 Aug 2010, 07:01:07 »
I'd like to have certain units on the Independent side to switch to the Opfor side...but not all of the Independent side's units. I've tried placing an Opfor unit far away and using the following code at the appropriate time:

Code: [Select]
[indieUnit1, indieUnit2] joinSilent (group opforUnit);
group opforUnit selectLeader indieUnit1;

While that does cause them to join the Opfor unit's group, the units do not register as enemies for some reason. In fact, if I attack them after they've joined the Opfor unit's group, I lose points and my own unit attacks me as a renegade.

Next, I tried using the "addScore" command but as the BI wiki states, that command "works only on server (dedicated or hosted) and has global effect, when used on client it has no effect in ArmA 2 (ver. 1.2)."

Does anyone have any suggestions as to how to make this work? Thanks!

Offline Zipper5

  • BIS Team
  • ****
Re: Causing units to switch sides
« Reply #1 on: 26 Aug 2010, 12:56:39 »
Have them start the mission as OPFOR units but with this setCaptive true on. You can do this by either grouping them to an OPFOR unit that has a 0% probability of presence, or by going into the mission.sqm and changing GUER to EAST for those units. When you want them to turn bad, simply do this setCaptive false.

Of course, you may then have to do it to the BLUFOR units so that the now OPFOR units don't kill them all without any resistance. :P

Offline zonker3210

  • Members
  • *
Re: Causing units to switch sides
« Reply #2 on: 26 Aug 2010, 14:27:08 »
Thanks, Zipper5. I considered using the solutions you suggested but neither one really fit the scenario I had in mind. Basically, I'm creating a mission where some VIPs pass by some friendly units...however, the units turn out to be, for lack of a better term, traitors. Therefore, I want the traitors' uniforms to be exactly the same as those of the regular Blufor units. I mean, if you're a US soldier protecting a dignitary and see an Takistani insurgent unit standing around in a crowd of US forces, it's pretty clear who to keep an eye on, eh? ;)

That said, late this evening I found a pretty effective way of handling this situation. Basically, I'm using Blufor units (I'll refer to them as the main group) grouped to an Opfor unit whose probability of presence is zero. I keep these "main group" guys far away from the action. Meanwhile, I have matching Blufor units who act as placeholders for the real traitors. When it comes time for the traitors to reveal themselves, I...

1.) delete each of the placeholder units,
2.) teleport in the corresponding unit from the main group soldiers, and
3.) assign targets

...so that it looks as though some friendly units just went rogue.

I will prepare a small demo mission showing how I accomplished this in case others here might find it helpful as well.

Thanks again, though!