Haz_ah 1 Posted December 30, 2012 Hey, I'm trying to make it so that if the player enters a specific vehicle, named "truck" then they can effectively bypass Opfor check points. To do this, I have created a simple statement that I enter in the player's init field: if (this in truck) then {this setCaptive true}; I'm relatively new to scripting within arma so can you guys let me know if this is correct. I tried it but they still shot at me while I drove past. Thanks. Share this post Link to post Share on other sites
f2k sel 145 Posted December 30, 2012 In principle it's right but placing it in the init won't help as init's are executed as soon as the game starts and it will only run once. You will need to either loop the script or use a trigger. A trigger would be easiest name the vehicle truck and you will need to use player or the name of the unit you can't use this in a trigger. place one on the map and set it repeating then add the following, it's more or less how you had it, you can delete the hint it's there so you know it's working cond player in truck on act player setCaptive true;hint "captive" Share this post Link to post Share on other sites
Haz_ah 1 Posted December 30, 2012 In principle it's right but placing it in the init won't help as init's are executed as soon as the game starts and it will only run once.You will need to either loop the script or use a trigger. A trigger would be easiest name the vehicle truck and you will need to use player or the name of the unit you can't use this in a trigger. place one on the map and set it repeating then add the following, it's more or less how you had it, you can delete the hint it's there so you know it's working cond player in truck on act player setCaptive true;hint "captive" Thanks, I will try this out! Share this post Link to post Share on other sites