Scripts.SetVar
Declaration
Scripts.SetVar(Tile ScriptTile, string Name, object Value)
Description
Sets the Name variable value to Value for a ScriptTile.
--Gets the Tile object of the other ScriptTile,
--and sets the value of the editor-exposed "BlastForce" variable to 5
local otherScriptTile = World.GetTile(V2(4, 5), 0);
Scripts.SetVar(otherScriptTile, "BlastForce", 5);
Declaration
Scripts.SetVar(Tile ScriptTile, Dictionary Variables)
Description
Sets the Variables for a ScriptTile.
--Gets the Tile object of the other ScriptTile,
--and sets the value of the editor-exposed "BlastForce" and "BlastPosition" variables
local otherScriptTile = World.GetTile(V2(4, 5), 0);
Scripts.SetVar(otherScriptTile, {BlastForce = 5, BlastPosition = V3(5, 1, 4)});
Declaration
Scripts.SetVar(Dictionary<Tile> ScriptTiles, string Name, object Value)
Description
Sets the Name variable value to Value for ScriptTiles.
--Gets the Tile objects of the other ScriptTiles,
--and sets the value of the editor-exposed "BlastForce" variables to 5
local otherScriptTiles = {World.GetTile(V2(4, 5), 0), World.GetTile(V2(2, 5), 0), World.GetTile(V2(0, 5), 0)};
Scripts.SetVar(otherScriptTiles, "BlastForce", 5);
Declaration
Scripts.SetVar(Dictionary<Tile> ScriptTiles, Dictionary Variables)
Description
Sets the Variables for ScriptTiles.
--Gets the Tile objects of the other ScriptTiles,
--and sets the value of the editor-exposed "BlastForce" and "BlastPosition" variables
local otherScriptTiles = {World.GetTile(V2(4, 5), 0), World.GetTile(V2(2, 5), 0), World.GetTile(V2(0, 5), 0)};
Scripts.SetVar(otherScriptTiles, {BlastForce = 5, BlastPosition = V3(5, 1, 4)});