Skip to content

More Functions

Compare
Choose a tag to compare
@JujuAdams JujuAdams released this 02 May 20:10
· 329 commits to master since this release

Adds some more fuctions:

  1. snap_deep_copy() returns a copy of a struct/array, and a copy of any nested structs and arrays.

  2. snap_difference() returns a data structure that describes the difference between two struct/arrays, including any nested struct/arrays.

  3. snap_difference_delta() applies a difference data structure (made by snap_difference()) to a struct/array. This will set values "in place" in the targeted struct/array.

N.B. Due to missing functionality in GMS2.3.0, array element and struct variable deletion is not fully functional. Instead, when an array element or struct variable is deleted, the value will be set to undefined.

 

How do I import SNAP into my game?

GameMaker Studio 2 allows you to import assets directly into your project via the "Local Package" system. From the the list of files below, download the .yymps file. In the GMS2 IDE, load up your project and click on "Tools" on the main window toolbar. Select "Import Local Package" from the drop-down menu then import the script from the DoLater package.

N.B. SNAP is only compatible with GMS2.3.0 and above.