Jump to content
Sign in to follow this  
Fraser

Config advice needed!!!

Recommended Posts

Hi there,

Is it possable to have it in the config.cpp for an action (opening door's) so that only Bulfor or civ's can access the action.

Many thanks Fraser

Share this post


Link to post
Share on other sites

Unfortunately, I don't believe you can reference the action performer in the condition and action statement in config class UserActions.

If you use addAction, the condition can reference them by _this, ex:

obj addAction ["Open Door","door.sqf",[1],1,false,true,"","(_target animationPhase 'door' == 0) && (side _this == west || side _this == civilian)"];

Share this post


Link to post
Share on other sites

Thanks for this,

I actually found out that you can set it so that a side can use that action.

condition = "side player == west && this animationPhase ""Door1_top_anim"" < 0.1";

As you can see all you do is add it into the condition field of the animation in the config.cpp.

class Odoor_1
		{
			displayName = "Open Door";
			position = "C1";
			radius = 3;
			onlyforplayer = 1;
			condition = "side player == west && this animationPhase ""Door1_top_anim"" < 0.1";
			statement = "this animate [""Door1_top_anim"",1]; this animate [""Door1_mid_anim"",1]; this animate [""Door1_bot_anim"",1]";
		};

Fraser

Edited by Fraser

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  

×