Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
eagledude4

menu option under conditions?

Recommended Posts

I'd like to know how to only allow a player to use a scroll menu option (opening a door) only when a certain script condition has been met if possible.

Edited by eagledude4

Share this post


Link to post
Share on other sites

Example

class UserActions
{
	class StartNext
	{
		priority = 0;
		displayName = "Start next";
		position = "cockpit";
		onlyforplayer = 1;
		radius = 5;
		condition = "(isEngineOn this) and (driver this == player) and ((this animationphase ""hidePropBlur3"") == 1)";
		statement = "[this] execVM ""\x\inv44\addons\i44_base_scripts\vehicle\plane\Ju52_StartNext.sqf"";";
	};
};

Share this post


Link to post
Share on other sites

Thanks Gnat, wasn't expecting you to reply here :P

For the condition you shared though, it that looks it's specific to that model's config, and not any public variables in the mission.

My question was more specific to buildings.

Edited by eagledude4

Share this post


Link to post
Share on other sites

Why surprised I'm here? As an addon maker you have to have skills in all areas.

On the Q:

I know it was buildings you were asking about (same code applies) and I'm yet to see any demonstration of any way to override menus within a terrain and buildings already developed/deployed.

So my simple answer is, you can't. Only defined at design time.

A uber scripter may have found a solution, but you have posted in the wrong sub forum for those people.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×