Jump to content
Sign in to follow this  
Haz_ah

Blufor bypassing Opfor checkpoint

Recommended Posts

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

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
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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×