Home   Help Search Login Register  

Author Topic: How to change sides of unit in-game  (Read 438 times)

0 Members and 1 Guest are viewing this topic.

crimsontide

  • Guest
How to change sides of unit in-game
« on: 30 Jul 2003, 01:59:47 »
Im new to this forum, even though Ive been downloading addons from it for ages and am a veteran of the game itself..

To cut to the chase, I am making a triple pack of quality missions including briefings/overviews (sadly without pics @ the moment) and in one of them, the player is a civilian who is really a western spy but to get his clothes correct, Ive made him a civilian and armed him (Im using v1.91 of OFP:R)
Hes friendly to the Russians so far, but in the mission, he has to assasinate 3 people.
I have set up the appropriate triggers so the alarms go off and they start fleeing after one of them has been killed and an 'objective complete' when all are dead BUT I wanted to change the side of the civilian to WEST in-game with a trigger command (E.g. In the activation part of a trigger) when 1 of the 3 are killed so that the Russians will try to kill me..

I am aware that after a few kills, they will try and target me but it is still delayed and its only after a few kills and its not realisitc enough.

If you have understood, thankyou!!, and please reply (Preferably without the answer of a script involving notepad of other files etc as I have managed to do many of the things that people make scripts for just by using triggers and its easier and less hassle)... Thanks for reading this...

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:How to change sides of unit in-game
« Reply #1 on: 30 Jul 2003, 02:14:37 »
well... just make it so when he kills one guy use a trigger to detect this and use in the on activation field:

player addrating -1000

this will set his score so low, the men will shoot him after killing one guy... although the final briefing score would appear apauling
Proud Member of the Volunteer Commando Battalion

peter

  • Guest
Re:How to change sides of unit in-game
« Reply #2 on: 30 Jul 2003, 02:19:21 »
i guess -1000 is not enough, -10000 works definitely ...  ;D

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:How to change sides of unit in-game
« Reply #3 on: 30 Jul 2003, 10:33:41 »
Create  your player unit as a west soldier.    Name him Bob (or whatever) and in his init field write this

this setCaptive true

Now close the mission editor and open up the mission.sqm and find the player unit.   I can't remember exactly how you do this but basically you change his type from SoldierWB (or whatever he is) Man1, or something else civilian.    Save the mission.sqm and go back to the mission editor.     He will now look like a civvy, though he will still be a west soldier.    But hey, he is setcaptive true so east will not shoot at him.   At the appropriate moment write

Bob setCaptive false

and away you go.

If you edit the unit in the mission editor he will revert to looking like a west soldier, so don't ... in fact he may revert if you save anything in the Editor, so do all this just before you turn the file into a .pbo

This has come up before so if I haven't been clear, or if it doesn't work, use the forum search function.
Plenty of reviewed ArmA missions for you to play