Component:DynamicVariableStatus: Difference between revisions

From Resonite Wiki
Automated: update component fields
add info
 
(One intermediate revision by one other user not shown)
Line 2: Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
{{stub}}
Dynamic Variable Status is a component that allows for reading if a certain [[Dynamic Variables|dynamic variable]] with a type and name exists and/or is linked to a [[Component:DynamicVariableSpace|space]]. Which space this component reads from is determined by the slot this component is attached to. How a slot finds a dynamic variable space is further explained on the [[Dynamic Variables]] page.
{{Infobox Component
{{Infobox Component
|Image=DynamicVariableStatus`1Component.png
|Image=DynamicVariableStatus`1Component.png
Line 11: Line 11:
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|VariableName|String|
|VariableName|String| The Variable name to check the status for with the [[Dynamic Variables]] System.
|IsLinkedToSpace|{{RootFieldType|RawOutput`1|[[Type:Bool|Bool]]}}|TypeAdv1=true|
 
|VariableExists|{{RootFieldType|RawOutput`1|[[Type:Bool|Bool]]}}|TypeAdv2=true|
|IsLinkedToSpace|{{RootFieldType|RawOutput`1|[[Type:Bool|Bool]]}}|TypeAdv1=true| Checks if the variable with the <code>VariableName</code> and with this component's sub type (the "<T>" of this component) is linked to the found variable space. How a slot finds a dynamic variable space is further explained on the [[Dynamic Variables]] page.
|VariableExists|{{RootFieldType|RawOutput`1|[[Type:Bool|Bool]]}}|TypeAdv2=true| Checks if the variable with the <code>VariableName</code> and with this component's sub type (the "<T>" of this component) exists in the found variable space. How a slot finds a dynamic variable space is further explained on the [[Dynamic Variables]] page.
}}
}}


Line 21: Line 22:
<!--T:4-->
<!--T:4-->
== Examples ==
== Examples ==
- This component can be used to check if a battery is in a charger
- This component can be used to control if functionality will work on an item.
- This component can also be used for behavior of snappers or items by checking if the variable they are searching for exists or if the item is even connected to a space it can use.


<!--T:5-->
<!--T:5-->
== Related Components ==
== Related Components ==
</translate>
</translate>
[[Category:ComponentStubs]]
[[Category:Generics{{#translation:}}]]
[[Category:Generics{{#translation:}}]]
[[Category:Components{{#translation:}}|Dynamic Variable Status`1]]
[[Category:Components{{#translation:}}|Dynamic Variable Status`1]]
[[Category:Generic Components{{#translation:}}|Dynamic Variable Status`1]]
[[Category:Components:Data:Dynamic{{#translation:}}|Dynamic Variable Status`1]]
[[Category:Components:Data:Dynamic{{#translation:}}|Dynamic Variable Status`1]]

Latest revision as of 17:19, 19 March 2024

Dynamic Variable Status is a component that allows for reading if a certain dynamic variable with a type and name exists and/or is linked to a space. Which space this component reads from is determined by the slot this component is attached to. How a slot finds a dynamic variable space is further explained on the Dynamic Variables page.

Component image 
Dynamic Variable Status`1 component as seen in the Scene Inspector


Fields

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled.
VariableName String The Variable name to check the status for with the Dynamic Variables System.
IsLinkedToSpace raw output of Bool Checks if the variable with the VariableName and with this component's sub type (the "<T>" of this component) is linked to the found variable space. How a slot finds a dynamic variable space is further explained on the Dynamic Variables page.
VariableExists raw output of Bool Checks if the variable with the VariableName and with this component's sub type (the "<T>" of this component) exists in the found variable space. How a slot finds a dynamic variable space is further explained on the Dynamic Variables page.

Usage

Examples

- This component can be used to check if a battery is in a charger - This component can be used to control if functionality will work on an item. - This component can also be used for behavior of snappers or items by checking if the variable they are searching for exists or if the item is even connected to a space it can use.


Related Components