Headcannon Game Engine Script Commands - Math Operations (Flags)


These Commands manipulate an entry from an "Array" of variables.

An "Array" is simply a listing of variables that can be accessed according to ID (their position in the list). Object Variables, Player Variables, and Reg]sters are technically already Arrays, however, most Script Commands that access them require an explicit ID value to be given, making it difficult to dynamically maintain lists.

These Commands allow truer use of the array setup by allowing a list ID to be generated by whatever means desired and retrieved from a variable, rather than requiring the script author to manually calculate and enter a fixed ID. They allow the retrieval of a value from an arbitrary variable (any variable whose ID is not known during script writing time, and which may change during the course of gameplay) so that it can be stored in a variable with a known ID and read, or manipulated by normal math or conditional Commands and then stored back into its original array position, or any other position that may be desired.

They need not be used only for 2D arrays. By manually keeping track of and calculating the sizes of and starting points of array dimensions, it is possible to manage multi-dimensional arrays if they become necessary.

Index:




Descriptions:




Examples: