Home   Help Search Login Register  

Author Topic: Need help with resistance swithching sides.  (Read 1681 times)

0 Members and 1 Guest are viewing this topic.

Offline izaktj

  • Members
  • *
Need help with resistance swithching sides.
« on: 07 Jul 2008, 08:30:00 »
Hi everyone, first let me congratulate everyone for this site and say that I'm very new to this. I have come here to request your help in a mission I am making. The deal is I want a groups of soldiers to be in a vehicle, move and and get out at a resistance checkpoint which would be friendly at that time. Than after talking for, let's say 30 seconds they become enemies and start firing each other. Like in this scene of a movie http://www.youtube.com/watch?v=AwmlNL9zwCc]http://www.youtube.com/watch?v=AwmlNL9zwCc]http://www.youtube.com/watch?v=AwmlNL9zwCc

I tried using setfriend but OFP did not recognize it, later I found out it was an ARMA command.
Any ideas? I can manage all the other stuff with waypoints but this I don't no how to do

Thanks a lot!

Offline Gcfungus

  • Members
  • *
Re: Need help with resistance swithching sides.
« Reply #1 on: 07 Jul 2008, 08:48:06 »
This might work, it's a bit crude however.
Create a man on an enemy side, and make him a higher rank than the one you want to turn enemy. Make sure he is hidden somewhere, and doesn't affect normal play.
At the point when you want them to turn make the man join the player who will turn enemy.
Code: [Select]
[cheatguy] join dealmaker1(you can change the names)
and put
Code: [Select]
[cheatguy] join grpnull
cheatguy setpos [0,0,0]
You would have to test it, as I'm not sure it'd work.
The object of war is not to die for your country, but to make the other bastard die for his.
~George Patton

Offline Denz

  • Former Staff
  • ****
Re: Need help with resistance swithching sides.
« Reply #2 on: 07 Jul 2008, 08:49:05 »
Easist way would be to activate a little script so that the trigger createUnits an enemy officer that is in the same group as the first resistance group and then delete him.

Does that make sense? I have to go to work now but if you are still stuck on this later I'll write it up properly.
I've got 'em right where I want 'em - surrounded from the inside!
Jerry "Mad Dog" Shriver, SOG Recon One-Zero
24/09/41 - 24/04/69

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re: Need help with resistance swithching sides.
« Reply #3 on: 07 Jul 2008, 10:39:26 »
You might want to look at the setCaptive command.  Any unit that has setCaptive true will not be attacked (but it will still attack others so you may need to setCaptive true for all the units in the vicinity, or setCombatMode "BLUE" to stop the unit shooting).  You will also need to setBehaviour of the units to Careless as well.  Then when you want them to fight just set behaviour to Aware, setCaptive false and setCombatMode "RED". 

I suggest you read about setCaptive, setBehaviour and setCombatMode in the Comref and then play around with them to see how they work togther.

You cannot make a unit change sides during a mission so if the above does not do what you want then you will need to have a replacement unit of the side you want hidden away on some offshore island and then at the appropriate moment use setPos to swap the units over.
« Last Edit: 07 Jul 2008, 11:18:01 by THobson »

Offline izaktj

  • Members
  • *
Re: Need help with resistance swithching sides.
« Reply #4 on: 07 Jul 2008, 11:24:44 »
Guys thanks a lot!!!  :clap: :clap: :clap: :clap: :clap:
I wasn't expecting so much responses is such little time! This is awesome! :D
Well I found a "easy" way of what I was looking, just using a trigger which activates when a civilian is in the trigger zone.
1- grup1 being res with a waypoint stating never fire and careless mode
2- grup2 being West with a waypoint stating never fire and careless mode
3- civillian with a move waypoint to the trigger zone
4- Trigger on activation: group1 setBehaviour "combat";group2 setBehaviour "combat";group1 setCombatMode "RED";group2 setCombatMode "RED" when civilian present. After that the civilian will join the res group so I can kill him (Still not written nor tested)

lol quite simple =D
Just one thing, I don't want them all to go prone =/ I remember there was a single command that made them stop going prone, can't remember it.

Again guys thanks a lot! :clap:

Offline Cheetah

  • Former Staff
  • ****
Re: Need help with resistance swithching sides.
« Reply #5 on: 07 Jul 2008, 11:27:46 »
izaktj, welcome to OFPEC!

About the prone part. You could try: setUnitPos.
Code: [Select]
unit setUnitPos "UP";
I'm not sure if it would give the desired result though. Might not be enough to stop the AI from going prone.
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Need help with resistance swithching sides.
« Reply #6 on: 07 Jul 2008, 11:28:24 »
Quote
I wasn't expecting so much responses is such little time! This is awesome!

Welcome to OFPEC - The Editing Center  ;)

Offline Denz

  • Former Staff
  • ****
Re: Need help with resistance swithching sides.
« Reply #7 on: 07 Jul 2008, 11:29:01 »
The setUnitPos command. The following will ensure the unit stays standing.
Code: [Select]
this setUnitPos "up"Have a look in the comref about it.

I wasn't sure how setcaptive would work within a group likewise using addrating may end up with them all shooting each other

edit:
blimey everyone's quick this morning :D

edit:
forget that, me not thinking properly  ::)
Oh yes,  :welcome: from me too
« Last Edit: 07 Jul 2008, 12:07:32 by Denz »
I've got 'em right where I want 'em - surrounded from the inside!
Jerry "Mad Dog" Shriver, SOG Recon One-Zero
24/09/41 - 24/04/69

Offline izaktj

  • Members
  • *
Re: Need help with resistance swithching sides.
« Reply #8 on: 07 Jul 2008, 11:39:07 »
Wow 3 replies in no time! I gotta tell this is the forum where members are most helpful  ;)
Thanks for the welcome  :D
Thanks a lot guys!