Eden Editor: Layer: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{KeyboardShortcut" to "{{Controls")
m (Text replacement - "{{Feature|Important|" to "{{Feature|important|")
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{TOC|side}}
{{TOC|side}}
A layer is like a folder that can contain multiple entities of type [[#Object|object]], [[#Group|group]], [[#Trigger|trigger]], [[#Waypoint|waypoint]], [[#System|system]] or [[#Marker|marker]]. They can also contain sub-layers. Layers can be useful in various ways such as:
A layer is like a folder that can contain multiple entities of type [[#Object|object]], [[#Group|group]], [[#Trigger|trigger]], [[#Waypoint|waypoint]], [[#System|system]] or [[#Marker|marker]].
They can also contain sub-layers. Layers can be useful in various ways such as:
* Tidying up the editor view while editing by hiding the layers and their entities
* Tidying up the editor view while editing by hiding the layers and their entities
* Grouping certain entities together thematically
* Grouping certain entities together thematically
* Preventing a group of entities from being accidentally edited by disabling transformation
* Preventing a group of entities from being accidentally edited by disabling transformation
* Dynamically creating the entities within a layer during the scenario
* Dynamically creating the entities within a layer during the scenario


== Creating a layer ==
== Creating a layer ==
There multiple ways to create layers:<br/>
There multiple ways to create layers:<br/>
1. Select entities in the 3D or map view or the entity list (left panel) and press the ''New Layer'' button in the entity list<br/>
# Select entities in the 3D or map view or the entity list (left panel) and press the ''New Layer'' button in the entity list<br/>
2. Use the [[add3DENLayer]] scripting command<br/>
# Use the [[add3DENLayer]] scripting command<br/>
{{Feature|informative|Pressing the ''New Layer'' button without having entities selected will create an empty layer}}
{{Feature|informative|Pressing the ''New Layer'' button without having entities selected will create an empty layer}}
[[File:A3 EdenEditor CreateLayer.gif|center|512px]]
[[File:A3 EdenEditor CreateLayer.gif|center|512px]]


== Deleting a layer ==
== Deleting a layer ==
Layers can be deleted by either selecting them in the entity list and pressing the {{Controls|Del}} key or using the ''Delete'' button in the entity list.
Layers can be deleted by either selecting them in the entity list and pressing the {{Controls|Del}} key or using the ''Delete'' button in the entity list.
{{Feature|Important|Deleting a layer will also delete all sub-layers and entities within it!}}
{{Feature|important|Deleting a layer will also delete all sub-layers and entities within it!}}
 


== Dynamically create layer entities ==
== Dynamically create layer entities ==
One advantage of layers is that they can be used to hide or show all entities within the layer dynamically via [[:Category: Scripting Topics|scripting]] during a scenario.<br/><br/>
One advantage of layers is that they can be used to hide or show all entities within the layer dynamically via [[:Category: Scripting Topics|scripting]] during a scenario.<br/><br/>
1. Create a layer, name it ''NewAO'' and add some objects and markers to it.<br/>
# Create a layer, name it ''NewAO'' and add some objects and markers to it.
2. Select all objects in that layer and uncheck ''Show Model'' and ''Enable Simulation'' in the attributes. In case of markers, set the ''Alpha'' value to {{hl|0}}<br/>
# Select all objects in that layer and uncheck ''Show Model'' and ''Enable Simulation'' in the attributes. In case of markers, set the ''Alpha'' value to {{hl|0}}<br>[[File:A3 EdenEditor HideLayerEntities.gif|center|512px]]
[[File:A3 EdenEditor HideLayerEntities.gif|center|512px]]
# Preview the scenario
3. Preview the scenario<br/>
# All objects and markers will now be invisible
4. All objects and markers will now be invisible<br/>
# Open the [[Arma 3: Debug Console]] and execute the following code. If you use want to activate the layer via a trigger, make sure to check the ''Server only'' checkbox<sqf>
5. Open the [[Arma 3: Debug Console]] and execute the following code. If you use want to activate the layer via a trigger, make sure to check the ''Server only'' checkbox
getMissionLayerEntities "NewAO" params ["_objects", "_markers"]; // The command returns an array with two arrays. First array contains all objects, second array contains all makers
<code>[[getMissionLayerEntities]] "NewAO" [[params]] ["_objects", "_markers"]; {{cc|The command returns an array with two arrays. First array contains all objects, second array contains all makers}}
_markers apply { _x setMarkerAlpha 1; }; // Show all markers
_markers [[apply]] { _x [[setMarkerAlpha]] 1; }; {{cc|Show all markers}}
_objects apply { _x enableSimulationGlobal true; _x hideObjectGlobal false; }; // Show all entities and enable their simulation
_objects [[apply]] { _x [[enableSimulationGlobal]] [[true]]; _x [[hideObjectGlobal]] [[false]]; }; {{cc|Show all entities and enable their simulation}}</code>
</sqf>
 


== Attributes ==
== Attributes ==
<onlyinclude>
<onlyinclude>
{| class="wikitable sortable"
{| class="wikitable sortable"
Line 43: Line 52:
| '''Name'''
| '''Name'''
| Init
| Init
| Name of the layer set in [[Eden Editor]]
| Name of the layer set in [[:Category:Eden Editor|Eden Editor]]
| <small>{{hl|Name}}</small>
| {{hl|Name}}
| [[String]]
| [[String]]
|-
|-
| '''Enable Transformation'''
| '''Enable Transformation'''
| Init
| Init
| If set to [[false]] (unchecked), the layer cannot be modified inside [[Eden Editor]].
| If set to [[false]] (unchecked), the layer cannot be modified inside [[:Category:Eden Editor|Eden Editor]].
| <small>{{hl|Transformation}}</small>
| {{hl|Transformation}}
| [[Boolean]]
| [[Boolean]]
|-
|-
| '''Enable Visibility'''
| '''Enable Visibility'''
| Init
| Init
| If set to [[false]] (unchecked), the layer will not be shown inside [[Eden Editor]]. This '''will not''' affect visibility during the scenario!
| If set to [[false]] (unchecked), the layer will not be shown inside [[:Category:Eden Editor|Eden Editor]]. This '''will not''' affect visibility during the scenario!
| <small>{{hl|Visibility}}</small>
| {{hl|Visibility}}
| [[Boolean]]
| [[Boolean]]
|}
|}
</onlyinclude>


</onlyinclude>


[[Category: Eden Editor: Asset Types|Layer]]
[[Category: Eden Editor: Asset Types|Layer]]

Latest revision as of 01:24, 2 February 2024

A layer is like a folder that can contain multiple entities of type object, group, trigger, waypoint, system or marker. They can also contain sub-layers. Layers can be useful in various ways such as:

  • Tidying up the editor view while editing by hiding the layers and their entities
  • Grouping certain entities together thematically
  • Preventing a group of entities from being accidentally edited by disabling transformation
  • Dynamically creating the entities within a layer during the scenario


Creating a layer

There multiple ways to create layers:

  1. Select entities in the 3D or map view or the entity list (left panel) and press the New Layer button in the entity list
  2. Use the add3DENLayer scripting command
Pressing the New Layer button without having entities selected will create an empty layer
A3 EdenEditor CreateLayer.gif


Deleting a layer

Layers can be deleted by either selecting them in the entity list and pressing the Del key or using the Delete button in the entity list.

Deleting a layer will also delete all sub-layers and entities within it!


Dynamically create layer entities

One advantage of layers is that they can be used to hide or show all entities within the layer dynamically via scripting during a scenario.

  1. Create a layer, name it NewAO and add some objects and markers to it.
  2. Select all objects in that layer and uncheck Show Model and Enable Simulation in the attributes. In case of markers, set the Alpha value to 0
    A3 EdenEditor HideLayerEntities.gif
  3. Preview the scenario
  4. All objects and markers will now be invisible
  5. Open the Arma 3: Debug Console and execute the following code. If you use want to activate the layer via a trigger, make sure to check the Server only checkbox
    getMissionLayerEntities "NewAO" params ["_objects", "_markers"]; // The command returns an array with two arrays. First array contains all objects, second array contains all makers _markers apply { _x setMarkerAlpha 1; }; // Show all markers _objects apply { _x enableSimulationGlobal true; _x hideObjectGlobal false; }; // Show all entities and enable their simulation


Attributes

Info Development
Name Category Description Property Type
Name Init Name of the layer set in Eden Editor Name String
Enable Transformation Init If set to false (unchecked), the layer cannot be modified inside Eden Editor. Transformation Boolean
Enable Visibility Init If set to false (unchecked), the layer will not be shown inside Eden Editor. This will not affect visibility during the scenario! Visibility Boolean