Welcome, Guest Thursday 24th April 2014, 06:49:22
   Home   Help Search Login Register  

OFPEC Forum

Author Topic: Switching sides via Addaction and Trigger?  (Read 280 times)
0 Members and 1 Guest are viewing this topic.
Knight Trane
*
Offline Offline


« on: 28 Oct 2009, 00:32:34 »

Hi guys,

Been a long time.

A friend wants to make an MP,Infiltration style mission.  So there are a few scripting hurdles we need to clear.
  • How to switch sides and character, via command/addaction, so our hero can infiltrate the enemy HQ disquised as the enemy.
  • How to switch back once the infiltration mission is complete, or our hero is discovered.
  • Come up with some Behavioral parameters that our hero needs to stay within to avoid detection.


Any thoughts on any aspect would be helpful.
Thanks,
Logged
laggy
*
Offline Offline


"Behold a pale horse"


« Reply #1 on: 30 Oct 2009, 11:45:38 »

Not trying to market my work, but in this Armed Assault MP mission you will find a method that works quite well:

http://www.ofpec.com/missions_depot/index.php?action=details&id=204

It includes:

Script that senses if you are firing your weapon while detected.
Script that senses if an enemy have found a dead friend.
Script that by random can make an enemy suspect you (though setCaptive) and act accordingly, questioning etc.

I can explain better later if you are interested, I'm in a hurry now.

Cheers,

Laggy
« Last Edit: 30 Oct 2009, 11:47:12 by laggy » Logged

And I looked and beheld a pale horse and his name that sat on him was Death and Hell followed with him.
Knight Trane
*
Offline Offline


« Reply #2 on: 30 Oct 2009, 22:51:27 »

Thanks,

That all looks like good stuff.  I'll get my friend looking at those scripts.

Any thoughts on how to switch into a enemy unit?
Logged
laggy
*
Offline Offline


"Behold a pale horse"


« Reply #3 on: 31 Oct 2009, 07:34:49 »

If you want the infiltrators to use the same uniforms as their enemy:

- Group the players to a leading unit of the "enemy's enemy" side and then delete that leader. Players are now enemies of their "own side". For example: Group Russian players with U.S leader and the players will be treated as U.S troops, though in Russian uniforms.

Or better in my opinion:

- Open up mission.sqm (in notepad, while NOT loaded in editor) and switch side on group and units by text.
BE VERY CAREFUL WITH THE SYNTAX. Then load the mission in the editor and see how the players are enemies of their "own side". Make sure to have written everything you need in the init field of the units before, because if you open up a units editing sheet and save it, the units model will switch to "default side model" and you'll have to redo the notepad process.

Then use setCaptive command true and false.

Laggy
« Last Edit: 31 Oct 2009, 08:02:36 by laggy » Logged

And I looked and beheld a pale horse and his name that sat on him was Death and Hell followed with him.
Pages: [1]   Go Up
  Send this topicPrint  
 
Jump to: