Jump to content
rxnxr23

A super easy way to do "undercover" or "insurgency" missions

Recommended Posts

I forget where I first saw this, I didn't come up with it, but I've been using it since Arma 2 and it works every time. I searched forever to find this solution and I thought that I should post it in case one day somebody else is searching like I was and needs a clear, definite answer with no pitter-patter between rival coders.

It's so simple, but it has such a huge impact on gameplay. All it does is make it so all unarmed people in the game are considered civilians. It works the same as the "Surrendering" module in Arma 2 in a way, but it allows the player to do it too. I've used this mainly for missions where you're an Iraqi insurgent or a Taliban fighter so you can move through checkpoints and around the map unmolested as long as you appear harmless.

Here's how to do it:

1. Place a trigger on the map of any size.

2. Set activation to "Anybody".

3. Set it to trigger "Repeatedly". (This is located below the "Activation" listbox")

4. In the condition field place the following:

currentWeapon player == ""

5. In the "On Act." field place the following:

player setcaptive true

6. In the "On Dea." field place the following:

player setcaptive false

7. Test that it is working by doing the following: Place an OPFOR "Player" unit on one side of a building with

removeallweapons this

in its "init" line. On the other side of the building place an armed BLUFOR infantry unit and a weapon crate next to him. Walk up to the enemy and see if he attacks you. If he does not attack you then take a weapon from the crate and see if he attacks you. If he doesn't attack you no matter what the "setcaptive" flag may be stuck on "true". Post any problems or glitches here.

One last note: I think with how the AI works in Arma if they see you with a gun and you get rid of it real quick they'll shoot you anyway as if they "remember" that you had a gun a second ago, so you can't cheat and exploit the stupidity of the AI/the nature of the programming. This makes it so if you are considered hostile you'll need to duck into or around an object/obstacle/building/foliage in order to hide your weapons and re-assume your "civilian" disposition. I think this is a desirable glitch in this circumstance.

Share this post


Link to post
Share on other sites

To OP, works well. easy too. should help me with an idea i have.

Share this post


Link to post
Share on other sites

Because setCaptive is global, this should work in multiplayer too, right?

Share this post


Link to post
Share on other sites

wow thanks what a great thing.

 

On 3/16/2015 at 0:23 AM, dreadpirate said:

Because setCaptive is global, this should work in multiplayer too, right?

you have to change "player" to something else. example for two players, at least the way i do it:

 

name first player "guy1" or whatever you want.

 

name second playable unit "guy2" or whatever you want.

 

two triggers set identical with the stuff above in the first post.


 

currentWeapon player == ""

player setcaptive true

player setcaptive false

 

change that so for the first guy it would be like


 

currentWeapon guy1 == ""

guy1 setcaptive true

guy1 setcaptive false

 

do it again for the other guy.

 

if you do it this way it will work in multiplayer for multiple people. if one person goes aggro it wont make every player in the server a hostile enemy only the person who went aggro.

 

you probably already know this since you asked about global/local stuff but i thought it would post it anyway just in case.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×