Home   Help Search Login Register  

Author Topic: Changing a unit's side  (Read 1073 times)

0 Members and 1 Guest are viewing this topic.

Lone-Wolf

  • Guest
Changing a unit's side
« on: 14 Jan 2010, 22:45:21 »
The title says it all...

I've so far tried [_unit] join otherunit1 and that doen't work at all...

Help?  ???

  - Lone Wolf

(P.S. I'm talking about changing a units side mid-mission.  :dry: )
« Last Edit: 14 Jan 2010, 22:48:15 by Lone-Wolf »

Offline RKurtzDmitriyev

  • Former Staff
  • ****
Re: Changing a unit's side
« Reply #1 on: 14 Jan 2010, 23:24:55 »
Yes, that doesn't work for me either. I don't think there's any way to change a unit's side mid-mission in OFP. That changing of sides with join might just be an ArmA thing.

If the unit to be changed is not the player, then you might be able to effect some "smoke and mirrors" using deletevehicle and createunit in quick succession.

To get friendly units to shoot at the player, use addRating with a negative number. To keep enemies from shooting a unit, use setcaptive. Unfortunately those two won't mix.

Sorry I can't be more helpful. :(

EDIT: I just realized that you can create the illusion of the changing the player's side by deleting all enemy units and using createunit to replace them with friendly units with enemy uniforms and weapons, and vice versa with friendlies. Tedious, but I think it would work.

The only problem here is that you may now have black soldiers in USSR uniforms. ;)
« Last Edit: 14 Jan 2010, 23:31:22 by RKurtzDmitriyev »
The OFP Editing Center wishes to remind you that the faithful COMREF will never threaten to stab you and, in fact, cannot speak.
However, in the event that it does speak, you are encouraged to heed its advice. ;)

Lone-Wolf

  • Guest
Re: Changing a unit's side
« Reply #2 on: 15 Jan 2010, 17:24:47 »
OFC, there's always the inferior solution which is to do

_unit addrating (-(rating _unit)-10000)

and then make the player have the line

_player addrating 999999999999

which serves to ensure that allies don't turn against the player for "Friendly Fire"...   :D