R3vo/Sandbox1 – User

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Blanked the page)
Tag: Blanking
mNo edit summary
Line 1: Line 1:
{{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]]. 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 ==
[[File:A3 EdenEditor CreateLayer.gif|center|512px]]
== 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/>
1. Create a layer and fill it with entities as shown in the previous section.<br/>
2. Select all entities in that layer and uncheck ''Show Model'' and ''Enable Simulation'' in the attributes<br/>
[[File:A3 EdenEditor HideLayerEntities.gif|center|512px]]
3. Preview the scenario<br/>
4. Open the [[Arma 3: Debug Console]] and execute the following code:
<code>[[flatten]] [[getMissionLayerEntities]] "QRF" [[apply]] { _x [[enableSimulationGlobal]] [[true]]; _x [[hideObjectGlobal]] [[false]]; };{{cc|This will show all entities inside the layer and enable their simulation}}</code>
{{Feature|Warning|Always be aware of what kind of entities are inside your layer. To hide markers for example, set their ''Alpha'' value to <tt>0</tt> inside [[Eden Editor]] and use [[setMarkerAlpha]] during the scenario.}}
== Attributes ==
<onlyinclude>
{| class="wikitable sortable"
! colspan="3" | <big>Info</big>
! colspan="2" | <big>[[Eden Editor: Setting Attributes|Development]]</big>
|-
! Name
! Category
! class="unsortable" | Description
! Property
! Type
|-
| '''Name'''
| Init
| Name of the layer set in [[Eden Editor]]
| <small><tt>Name</tt></small>
| [[String]]
|-
| '''Enable Transformation'''
| Init
| If set to [[false]] (unchecked), the layer cannot be modified inside [[Eden Editor]].
| <small><tt>Transformation</tt></small>
| [[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!
| <small><tt>Visibility</tt></small>
| [[Boolean]]
|}
</onlyinclude>
[[Category:Eden Editor: Asset Types|Objects]]

Revision as of 13:37, 14 May 2021

A layer is like a folder that can contain multiple entities of type object, group, trigger, waypoint, system or marker. 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

A3 EdenEditor CreateLayer.gif

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 and fill it with entities as shown in the previous section.
2. Select all entities in that layer and uncheck Show Model and Enable Simulation in the attributes

A3 EdenEditor HideLayerEntities.gif

3. Preview the scenario
4. Open the Arma 3: Debug Console and execute the following code: flatten getMissionLayerEntities "QRF" apply { _x enableSimulationGlobal true; _x hideObjectGlobal false; };// This will show all entities inside the layer and enable their simulation

Always be aware of what kind of entities are inside your layer. To hide markers for example, set their Alpha value to 0 inside Eden Editor and use setMarkerAlpha during the scenario.

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