Jump to content
Sign in to follow this  
dar

Setcaptive false not working

Recommended Posts

Hey guys I'm searching for a solution on how to correctly use the setcaptive commands.

For example in my mission I have a player unit named "p1" and in its init field I put

this setcaptive true

Now I want this unit to be an undercover agent. He can walk beyond the enemy units but upon a trigger (for example when he shoots an enemy, haven't firgured out yet how to set that condition up) he should get spotted.

So for a test, I put down my unit, placed a few bad guys and created a trigger activated by radio bravo that does

p1 setcaptive false

but when I hit it and walk up to the enemy, my unit still wont get engaged by them. It seems I am still seen as captive even though I triggered the opposite. I also tried creating a script and execVM it with the trigger on radio Bravo but this also didnt work.

So, wheres the mistake?

Or is there another way to get this undecover thing working?

Share this post


Link to post
Share on other sites

Where you put in trigger that p1 setcaptive false in condition or in on act. Should be in on act.

Try to add in your radio trigger in condition: alive p1 and in on act: p1 setcaptive false. Just to check if it works. And in unit init write: p1 setcaptive true

Share this post


Link to post
Share on other sites

Seems to work somehow but the result is a typical arma mess. Only one of 20 units seems to think I am a threat and starts firing. All the other bad guys just go prone on kneel and raise their guns and start searching and stuff but dont pull the trigger even if I dance around in front of them.

Share this post


Link to post
Share on other sites

try to use the setcaptive true from the init.sqf or a script, not the unit's init. it might change something. just a thought...

Share this post


Link to post
Share on other sites

ahh thank you a lot thats just what I needed.

Share this post


Link to post
Share on other sites

Now I want this unit to be an undercover agent. He can walk beyond the enemy units but upon a trigger (for example when he shoots an enemy, haven't firgured out yet how to set that condition up) he should get spotted.

Getting a bit ahead but for that part you will need to use the "Fired" event handler (http://community.bistudio.com/wiki/ArmA_2:_Event_Handlers)

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
Sign in to follow this  

×