Component:DynamicReferenceVariableReset: Difference between revisions

From Resonite Wiki
imported>Mysticporo
Created page with "<languages></languages> <translate> <!--T:1--> {{stub}} {{Infobox Component |Image=DynamicReferenceVariableReset`1Component.png |Name=Dynamic Reference Variable Reset`1 }} <!..."
 
add info
 
(3 intermediate revisions by 2 users not shown)
Line 2: Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
{{stub}}
Dynamic Reference Variable Reset is a component that will reset the value for a [[Dynamic Variables|Dynamic Variable]] to a specified Reference. This is useful for when you are messing with an item, but you want the values for it to clear themselves with it is saved, loaded, or duplicated. The variable space is determined by the searching algorithm explained on [[Dynamic Variables]] page from the slot this is on.
{{Infobox Component
{{Infobox Component
|Image=DynamicReferenceVariableReset`1Component.png
|Image=DynamicReferenceVariableReset`1Component.png
Line 11: Line 11:
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|VariableName|String|
|VariableName|String| {{Template:Variable Name Component}}
|ResetOnLoad|Bool|
|ResetOnLoad|Bool| Reset when this component is loaded with a world.
|ResetOnDuplicate|Bool|
|ResetOnDuplicate|Bool| Reset when the object this is under is duplicated.
|ResetOnPaste|Bool|
|ResetOnPaste|Bool| Reset when the object this is under is pasted from clipboard.
|ResetTarget|IWorldElement|
|ResetTarget|'''T'''|TypeAdv4=true| The reference value to reset to when any of the enabled reset events occur.
}}
}}


Line 23: Line 23:
<!--T:4-->
<!--T:4-->
== Examples ==
== Examples ==
If you use this component with a slot selector, you can make the selection go null when the object is loaded or loaded with a world. This can be useful for something like a teleporter system or something, where you want the user to select where they want to go when the world loads, rather than being left at the last value it was at when the world was saved.


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

Latest revision as of 16:48, 19 March 2024

Dynamic Reference Variable Reset is a component that will reset the value for a Dynamic Variable to a specified Reference. This is useful for when you are messing with an item, but you want the values for it to clear themselves with it is saved, loaded, or duplicated. The variable space is determined by the searching algorithm explained on Dynamic Variables page from the slot this is on.

Component image 
Dynamic Reference Variable Reset`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 that will be used to link this component's refrenced value to the Dynamic Variables System.
ResetOnLoad Bool Reset when this component is loaded with a world.
ResetOnDuplicate Bool Reset when the object this is under is duplicated.
ResetOnPaste Bool Reset when the object this is under is pasted from clipboard.
ResetTarget T The reference value to reset to when any of the enabled reset events occur.

Usage

Examples

If you use this component with a slot selector, you can make the selection go null when the object is loaded or loaded with a world. This can be useful for something like a teleporter system or something, where you want the user to select where they want to go when the world loads, rather than being left at the last value it was at when the world was saved.

Related Components