How To Reference Element
Moderators: Flumminator, Zomis
- SLAPPYHAPPY2000
- Posts: 110
- Joined: Wed Jun 03, 2020 10:27 am
How To Reference Element
The only thing I really know about them is that you're not supposed to use them directly in your level. But how ARE you supposed to use them? From what I know, there isn't really a levelset that uses these elements at all. Clarification would be cool, who knows, once I know I might use them myself.
Re: How To Reference Element
As far as I remember, some of them are used by the Snake Bite "engine".
These are "reference elements", which means that they are used to reference other elements. They can be used in custom element (CE) conditions and actions. The element descriptions (what you can read when you move the mouse over these elements in the level editor's "element palette") basically tell you what you can use them for.
For example, the "player reference" element stands for the player that triggered the CE change, so you can reference one of the four players in a multi-player level, without the need to have four CE conditions and/or actions for all four players.
As another example, The "CV" and"CS" elements stand for the "custom element value" or "custom element score" counter for either the "trigger element" (the element used in the CE condition that triggers the CE change) or the current custom element, both interpreted as a game element. So you can store a game element in one of these counters and later use the counter value to get back that element. That way, you could, for example, create a CE that collects an arbitrary element and drops it at a later time (as it is able to store that game element by its element value).
The difference between the "custom element value" and the "custom element score" is that each instance of a CE has its own "value", while all CEs of the same type (that is, with the same custom element number) share the same "score" field.
The "-8" to "-1" and "+1" to "+8" elements just reference the CE at the position relative to the current CE, so you can create several different CEs that all behave the same, by just copying one CE and having the resulting CEs refer to its own relatively configured other CE. This makes mass-creating CEs much easier.
If you should have any further questions regarding reference elements, I'll explain some more.![Smile :-)](./images/smilies/icon_smile.gif)
These are "reference elements", which means that they are used to reference other elements. They can be used in custom element (CE) conditions and actions. The element descriptions (what you can read when you move the mouse over these elements in the level editor's "element palette") basically tell you what you can use them for.
For example, the "player reference" element stands for the player that triggered the CE change, so you can reference one of the four players in a multi-player level, without the need to have four CE conditions and/or actions for all four players.
As another example, The "CV" and"CS" elements stand for the "custom element value" or "custom element score" counter for either the "trigger element" (the element used in the CE condition that triggers the CE change) or the current custom element, both interpreted as a game element. So you can store a game element in one of these counters and later use the counter value to get back that element. That way, you could, for example, create a CE that collects an arbitrary element and drops it at a later time (as it is able to store that game element by its element value).
The difference between the "custom element value" and the "custom element score" is that each instance of a CE has its own "value", while all CEs of the same type (that is, with the same custom element number) share the same "score" field.
The "-8" to "-1" and "+1" to "+8" elements just reference the CE at the position relative to the current CE, so you can create several different CEs that all behave the same, by just copying one CE and having the resulting CEs refer to its own relatively configured other CE. This makes mass-creating CEs much easier.
If you should have any further questions regarding reference elements, I'll explain some more.
![Smile :-)](./images/smilies/icon_smile.gif)