Jump to content
Sign in to follow this  
twisted

dont activate add action when in vehcile

Recommended Posts

so ive got a hunt the intel type mission. but i need people to get out their vehicle to be able to activate an add action but right now you can just activate it from inside the vehcile.

so how do i make addactions only actiavable by units on foot?

Share this post


Link to post
Share on other sites

I'm not at my main machine right now so can't provide exact code, but the principle of what you want is this

if (vehicle player isequalto player) then { //player is on foot } else {// player is in a vehicle}

So we need to take this and put it into the condition field of the addaction.

Assuming you'e running this in multiplayer, you're going to be running this on the player client,

_target addAction["addaction text","script_to_run_when_selected.sqf",["CLICKY!"],1,true,false,"","vehicle player isequalto player"];

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  

×