Hi everyone! This update contains mostly bug fixes, but there is a change relating to the syntax of local variables that I wanted to call out specifically: going forward, local variable names must now begin with a dollar sign ($). This is to help distinguish variables in scripts and to prevent their names from conflicting with reserved words. Scripts that are already parsed will not be affected, however if you edit a script or create a new one, the parser will give an error when a variable name is missing the "$" prefix. As I understand it may be tedious to fix existing scripts, I am more than happy to help update them for anyone if you have large scripts using a lot of local variables (or even many small ones).

  • Changed syntax for local variables to require a dollar sign ($) prefix in front of the variable name (e.g. $my_var = 10), updated parser to display appropriate error message
  • Added "duplicate" function for duplicating an array or JSON data (e.g. $array_copy = duplicate($my_array) or $data_copy = duplicate(data["my_file"]))
  • Added "break" keyword to the scripting language for breaking out of either a "for" loop or a "while" loop
  • Added startup tip about holding the right mouse button down to look around freely while in first-person games
  • Added ability to drag and drop script functions into the source code area of the Script Editor (similar to Quick Script Builder)
  • Added error popup that displays when attempting to save a visual script containing variables without the "$" prefix (editor will also revalidate all visual node fields)
  • Updated drag and drop of script functions to insert the source code after the line over which the function is dropped (instead of always at the end of the script)
  • Updated expression builder dialogs in the Script Editor to display error message about the "$" variable name prefix for the exclamation icon's tooltip
  • Updated direct entry fields on visual script nodes to display error message about the "$" variable name prefix for the exclamation icon's tooltip
  • Updated "Attach Object" scripting function to support an additional parameter so the target entity's attach point ID can be different than that of the object's (e.g. attach_object("sword", player, "handle", "right_hand"))
  • Fixed issue with attach points where attaching an object to an attach point was not first removing the existing object on that same attach point
  • Fixed issue with the Dialogue Editor where dialogue text would sometimes be missing when using the default built-in RPG in a Box theme
  • Fixed issue where built-in translations for the game UI would not display when specifying a default locale other than "en"
  • Fixed issue with the game configuration setting for fallback locale not working properly in-game
  • Fixed camera clipping issue that could occur when using orthogonal projection for the default type then loading a map after the previous one used a "Standard" override
  • Fixed issue where using "Reset Camera" functions after the camera was locked and another map had been loaded could result in unexpected behavior (may need to add a "Lock Camera" to some existing scripts)
  • Fixed issue with the "null" keyword not being included in the syntax highlighting logic for scripts
  • Fixed issue with variable name validation on "For Loop" and "Assign Value" visual script nodes where the name would remain invalid when erasing and then re-entering the same text
  • Fixed issue with dialogue/battle marker icons not displaying in the Map Editor when an NPC had the "When Next to Player" behavior setting assigned
  • Fixed error that displays in the console window when capturing a thumbnail for a model in the Voxel Editor
  • Fixed issue where the movement interval values for NPC behavior settings were not being applied properly and would not trigger a change
  • Fixed issue with the "Add Waypoint" function not applying properly in the visual script when manually entered into a script's source code
  • Fixed issue with scripts not parsing correctly when using a local variable for the left operand of a "contains" conditional expression
  • Fixed issue with incorrect line being marked by the script parser when there were syntax errors with "elseif" conditions
  • Fixed error that would occur when manually entering an "elseif" block without any statements into the Script Editor
  • Fixed issue with incorrect Obsidian theme colors for the wizard info box on builder dialogs in the Script Editor (Conditional Expression Builder, etc.)
  • Fixed "is_vehicle" error that would occur when the player clicked on a non-adjacent character to interact (error was displayed upon interaction)
  • Fixed "move_interval" error that would occur in certain scenarios while an NPC's movement behavior was being processed
  • Fixed "marching_cubes" function error that would sometimes display in the console window when saving a model in the Voxel Editor