Home   Help Search Login Register  

Author Topic: Changing Sides or mimic  (Read 1537 times)

0 Members and 1 Guest are viewing this topic.

Offline Blacknite

  • Members
  • *
  • Chiefs runs the navy!
Changing Sides or mimic
« on: 11 Dec 2008, 04:40:33 »
Now in OFP Red Hammer, there was a mission inwhich an East unit (the player/spetz) switched side to Resistance, now I no longer have OFP installed on my computer no more but I was hoping somebody knows the trick for it.  I believe it was a mimic...

Offline Ext3rmin4tor

  • Members
  • *
Re: Changing Sides or mimic
« Reply #1 on: 11 Dec 2008, 11:06:54 »
I remember that but it was in a movie. Basically you can do that (in a movie) by moving the original unit to a location which is not visible by the camera or using a black fading effect, removing it with deleteVehicle and creating a unit for the resistance side (or better placing the unit far from the movie area and then moving it with setPos) at the original unit location. The resistence unit must have the same identity of the original one, so that the face, name and voice are the same: the unit will have the same look of the previous one but a resistence uniform since it is a resistence unit. Identities are set in the mission or campaign Description.ext (if you're making a single mission then you must put them in the Description.ext of the mission).

In ofp you can't do that for a playable unit since you can't remove a playable unit from the mission. You can do that in ArmA using the team switch feature. Basically you still create two units with the same identity for different sides, then you force the player to switch unit with selectPlayer (and remember to disable the teamSwitch window with the command enableTeamSwitch false so that the player can't switch back to the previous unit) and you move the new unit to the current player location, removing the original unit (just like what I explained before). You now have a playable unit for a different side with the same look of the original one (so it's like the unit has joined the other side).
How can you shoot women and children?
Easy! Ya' just don't lead'em so much! Ain't war hell?!!

Offline Blacknite

  • Members
  • *
  • Chiefs runs the navy!
Re: Changing Sides or mimic
« Reply #2 on: 11 Dec 2008, 14:04:23 »
Theres a switch sides for ArmA?  How would that work in single player?

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Changing Sides or mimic
« Reply #3 on: 11 Dec 2008, 15:04:45 »
Another option is to simply use the Join command:

First half of the mission, the unit is on its 'normal' side (say, OPFOR Especas).

Second half of the mission, the unit has switched to resistance. This you can do simply by taking the unit, and Joining that unit (so that the unit does not take command over, but is subordinate to) another unit on the enemy side.
Code: [Select]
[unitname] Join(Silent) commandingofficer. (there is also a command called JoinSilent which will omit the "2, follow 1" radio messages).

After that, you can simply deletevehicle the commandingofficer unit right away, and your unit should now have switched sides. :)

Non-tested, but should work!

A safer alternative if the first half of the mission does not involve any combat, is to simply make the unit a part of the other side from the beginning, and using setcaptive to make sure his friends don't attack him. In this case he can't be a part of a group of course. Same MO though : group him with a higher-ranking unit at mission start, and simply give the higher-ranking unit a probability of presence of 0%.

Good luck!

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Ext3rmin4tor

  • Members
  • *
Re: Changing Sides or mimic
« Reply #4 on: 11 Dec 2008, 18:47:38 »
Theres a switch sides for ArmA?  How would that work in single player?

The team switch in ArmA works like in the last mission of the campaign: if you press the "switch team" key the game prompts a window where you can select the unit you want to control. The unit must be a group leader and must be preset as "playable" in the editor (the same property you use to allow that unit to be used by a human player in multiplayer missions). If you force a unit switch with the command I was talking about before the game automatically switches the player unit into the new unit without prompting any window. You must prevent the player to use the team switch window because he can go back to the previous unit before you delete it.

@Wolfrug:
If you use the "join" command of course you join the other side group and the side itself but your skin won't change. For what I understood he wants to change also the player skin. You can only do that in ArmA since there is no unit switch option in OFP.
How can you shoot women and children?
Easy! Ya' just don't lead'em so much! Ain't war hell?!!

Offline Blacknite

  • Members
  • *
  • Chiefs runs the navy!
Re: Changing Sides or mimic
« Reply #5 on: 14 Dec 2008, 06:39:46 »
Well I used the join command for now, but I am pretty sure BIS had that mission setup as in you mimic a resistance character...  If only I still had OFP Red Hammer installed I would see how they did it...  I did remember it being a camera but I thought you were able to control the guy immediately...

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Changing Sides or mimic
« Reply #6 on: 14 Dec 2008, 11:00:14 »
Quote
I did remember it being a camera but I thought you were able to control the guy immediately...
Nah, it's a cutscene where you watch a guy that has the face of your character to go in some building or something, fade out, fade in and he comes out as a resistance character with the player's characters face, so it's not even the actual player in that cutscene. After it fades out you get into the actual mission (or it loads up the actual mission, can't remember which).
So what they did they just used the same face on several models..

Oh, and mimic in OFP/ArmA doesn't mean you mimic something, it's the characters facial impression
setMimic

The unit switch works perfectly with what you're trying to achieve..
addSwitchableUnit and selectPlayer should do the trick (worked for me), and I don't see any teamswitch dialogs to get rid off  :dunno:  but to be on the safe side do what was suggested above and disable it..
Oh, and the unit to be switched into doesn't need to be set as playable in this case (at least I didn't have to).
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Ext3rmin4tor

  • Members
  • *
Re: Changing Sides or mimic
« Reply #7 on: 14 Dec 2008, 11:54:25 »
Yeah, you're right, if you don't set the other unit as playable you don't have to disable the team switch dialog.
How can you shoot women and children?
Easy! Ya' just don't lead'em so much! Ain't war hell?!!

Offline Blacknite

  • Members
  • *
  • Chiefs runs the navy!
Re: Changing Sides or mimic
« Reply #8 on: 25 Dec 2008, 21:23:47 »
Hey guys I just played Secret Agent:  Unstoppable and I noticed the character for the Secret Agent is the thing I am looking for.  However, I opened it up and I am not finding the trick to it..   Anybody knows how he did it?