Eden Editor: Entity Context Menu: Difference between revisions
(Further formatting) |
No edit summary |
||
Line 25: | Line 25: | ||
=== How does it work? === | === How does it work? === | ||
''' | Let's take a closer look at example two.<br><br> | ||
'''hoverObjectCanFly''' and '''hoverObjectFlying''' are nothing less than two boolean values, which can either be [[true]] (0) or [[false]] (1).<br><br> | |||
If ''' | If '''hoverObjectCanFly''' is [[true]] (1) and '''hoverObjectFlying''' is [[false]] (0) the resulting equation looks like this:<br> | ||
<code>1 * (1-0) = x | |||
1 * 1 = x | |||
x = 1</code> | |||
The result will be [[true]] (1), therefore the entry will be shown. | The result will be [[true]] (1), therefore the entry will be shown. | ||
=== Supported Conditions === | === Supported Conditions === |
Revision as of 17:19, 3 December 2016
WIP
Conditions
- Context menu entries can have different conditions which need to be true in order for the entry to appear.
- The condition is defined by the conditionShow config entry.
class YourEntry
{
action = "call BIS_fnc_someFunction";//Can be any kind of expression defined as string
Text = "Delete Crew";//Name shown in the context menu
conditionShow = "hoverObjectVehicle";//Condition
};
The condition can be one of the strings from the table below, or a combination of multiple conditions.
Example 1: conditionShow = "hoverObjectCanFly";
Entry will only show if the object you are hovering over can fly.
Example 2: conditionShow = "hoverObjectCanFly * (1 - hoverObjectFlying)";
Entry will only show if the object you are hovering over can fly and the object isn't flying.
How does it work?
Let's take a closer look at example two.
hoverObjectCanFly and hoverObjectFlying are nothing less than two boolean values, which can either be true (0) or false (1).
If hoverObjectCanFly is true (1) and hoverObjectFlying is false (0) the resulting equation looks like this:
1 * (1-0) = x
1 * 1 = x
x = 1
The result will be true (1), therefore the entry will be shown.
Supported Conditions
Condition | Description |
---|---|
selected | True when an Eden entity is selected |
hoverObjectBrain | True when hovering over an objectBrain, e.g, AI |
hoverObjectVehicle | True when hovering over a vehicle |
IsInternal | Unknown |
hoverObject | True when hovering over any object |
hoverGroup | True when hovering over any group |
hoverTrigger | True when hovering over any trigger |
hoverWaypoint | True when hovering over any waypoint |
hoverLogic | True when hovering over any logic |
hoverMarker | True when hovering over any marker |
hoverObjectAttached | Unknown |
isMultiplayer | True when editing in multiplayer environment |
hoverObjectUav | True when hovering over an UAV |
isEditList | Unknown |
hoverLayer | True when hovering over a Layer |
hoverObjectCanFly | True when hovering an object which can fly |
hoverObjectCanFly | True when hovering an object which is flying |
selectedObject | True when an object is selected |
selectedWaypoint | True when a waypoint is selected |
selectedLogic | True when a logic is selected |
selectedMarker | True when a Marker is selected |