dar 12 Posted May 3, 2013 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
tom3kb 15 Posted May 3, 2013 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
dar 12 Posted May 3, 2013 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
Silderoy 1 Posted May 3, 2013 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
lato1982 36 Posted May 3, 2013 Hey, try to raise the oppforce soldiers skill to the max, also check this out this is definitly sth that you are looking for: http://www.kylania.com/ex/?p=98 also this: http://community.bistudio.com/wiki/addEventHandler and this: http://community.bistudio.com/wiki/ArmA_2:_Event_Handlers#Fired Share this post Link to post Share on other sites
dar 12 Posted May 4, 2013 ahh thank you a lot thats just what I needed. Share this post Link to post Share on other sites
Valfunction 1 Posted May 4, 2013 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