Save Value saves engine-specific data from a Data Source into a Variable or Switch. This allows you to connect to actual data from physics objects/actors, user interfaces, characters, and so forth in the engine, to your own data layer.
| Name | Explanation |
|---|---|
| Variable or Switch | Whether or not to get a variable or switch value from the Source. |
| Source | The Data Source to gather information from. |
| Unique ID (Optional) | The Unique ID to leverage, if required. |
| Parameters (Optional) | The additional parameters (usually an index for an Array or key for an element in Tags). |
| Name | Explanation |
|---|---|
| Global / Local Variable or Switch | Targets a single Switch or Variable, based on what was specified in the Source. |
This gets the Active Member Count from the Party Data Source and saves it into Global Variable 0.
{"Data":{"IsSwitch":0,"Source":{"$":"PartyDataSource","ParameterIndex":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":null,"VariableIndex":0,"Metadata":null},"PartyProperty":0,"Metadata":null},"Index":0,"IndexEnd":null,"IsLocal":0,"IsOperandReference":0,"IsReference":0,"OperandGlobalIndex":null,"OperandLocalIndex":null,"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.Data.SaveValueCommand"}
This gets the Unique ID from a position, specified by Global Variable 1, from All Members in the Party Data Source, and saves it into Global Variable 0.
{"Data":{"IsSwitch":0,"Source":{"$":"PartyDataSource","ParameterIndex":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":null,"VariableIndex":1,"Metadata":null},"PartyProperty":12,"Metadata":null},"Index":0,"IndexEnd":null,"IsLocal":0,"IsOperandReference":0,"IsReference":0,"OperandGlobalIndex":null,"OperandLocalIndex":null,"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.Data.SaveValueCommand"}
This gets whether or not an Item is Useable in the Menu, from a Unique ID specified by Global Variable 5, and saves it into Global Switch 0.
{"Data":{"IsSwitch":1,"Source":{"$":"InventorySlotDataSource","ParameterIndex":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":null,"VariableIndex":0,"Metadata":null},"InventorySlotFlag":0,"InventorySlotProperty":0,"IsLocal":0,"SourceIndex":5,"Metadata":null},"Index":0,"IndexEnd":null,"IsLocal":0,"IsOperandReference":0,"IsReference":0,"OperandGlobalIndex":null,"OperandLocalIndex":null,"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.Data.SaveValueCommand"}