Headcannon Game Engine Script Commands - Math Operations (Equal)
Index:
Variable Copy:
(D) (E) | _Reg=Reg |
(D) (E) | _Reg=Const |
(D) (E) | _Reg=Chr |
(D) (E) | _Reg=Obj |
(D) (E) | _Chr=Reg |
(D) (E) | _Chr=Const |
(D) (E) | _Chr=Chr |
(D) (E) | _Chr=Obj |
(D) (E) | _Obj=Reg |
(D) (E) | _Obj=Const |
(D) (E) | _Obj=Chr |
(D) (E) | _Obj=Obj |
Mass Setting:
(D) (E) | _Reg_SetRange |
(D) (E) | _Chr_SetRange |
(D) (E) | _Obj_SetRange |
Descriptions:
Variable Copy:
_Reg=Reg
_Reg=Const
_Reg=Chr
_Reg=Obj
_Chr=Reg
_Chr=Const
_Chr=Chr
_Chr=Obj
_Obj=Reg
_Obj=Const
_Obj=Chr
_Obj=Obj
(ALL) (Example)
These Commands copy the value of one variable to another
The Source variable is always considered to be from the Object or Player "Fetched" to "Reference 0"
The Destination variable is always considered to be from the Object or Player "Fetched" to "Reference 2"
Parameters:
- Src Var ID
- Dest Var ID
The first Parameter is the ID of the Variable whose value should be used, and the second
is the ID of the Variable in which to store the result
In the case of "Registers", "Var ID" is the ID of the "Register" that should be read/written. The "U" tag may be used
to specify a user-defined Register. Otherwise, the ID will refer to a Game Register
In the case of Player Variables, "Var ID" is the ID of the Player Variable that should be read/written. The capital "A"
tag may be used to specify an "Active" variable, the lower-case "a" to specify a user-
defined "Active" variable, and the lower-case "c" to specify a user-defined Constant.
Otherwise, the ID will refer to one of the Player's required Constants
In the case of Object Variables, "Var ID" is the ID of the Object Variable that should be read/written. The "E" tag may
be used to specify an "Extra" variable. Otherwise, the ID will refer to one of the
Object's standard variables
In the case of a Constant Value, "Var ID" is the actual value to be used in the calculation, rather than any variable ID
Mass Setting:
_Reg_SetRange
_Chr_SetRange
_Obj_SetRange
(ALL) (REG) (Example)
These Commands copy the given value into every variable within the given range.
The "R" or "r" tags
may be used to obtain a value from a Register for any of the Parameters.
Parameters:
- Src Value
This is the value that should be placed into the variables within the given range
- Var ID Start
- Var ID End
These are the starting and ending variable IDs for the range to set equal to the given value; the "Start" variable will be
set, the "End" variable will be set, and all variables in-between will be set
In the case of "Registers", "Var ID" are the starting and ending IDs of the "Register" range to set. The "U" tag may be used
to specify a user-defined Register. Otherwise, the ID will refer to a Game Register
In the case of Player Variables, "Var ID" are the starting and ending IDs of the Player Variable range to set for the Player that is "Fetched" to "Reference 2". The capital "A"
tag may be used to specify an "Active" variable, the lower-case "a" to specify a user-
defined "Active" variable, and the lower-case "c" to specify a user-defined Constant.
Otherwise, the ID will refer to one of the Player's required Constants
In the case of Object Variables, "Var ID" are the starting and ending IDs of the Object Variable range to set for the Object that is "Fetched" to "Reference 2". The "E" tag may
be used to specify an "Extra" variable. Otherwise, the ID will refer to one of the
Object's standard variables
Examples:
#_Reg=Const ;Set the value of "User Register" 7 equal to 3
: U7 ;(Dest) "User Register" 7
: 3 ;(Src) 3
; ----------
#_Chr=Chr ;Set the value of User-created "Active Variable" 2 of the Player "Fetched" to "Reference 2" equal to the value of User-created "Active Variable" 12 of the Player "Fetched" to "Reference 0"
: a2 ;(Dest) User-created "Active Variable" 2 of the Player "Fetched" to "Reference 2"
: a12 ;(Src) User-created "Active Variable" 12 of the Player "Fetched" to "Reference 0"
; ----------
#_Obj=Reg ;Set the value of "Extra Variable" 8 of the Object "Fetched" to "Reference 2" equal to the value of "User Register" 24
: E8 ;(Dest) "Extra Variable" 8 of the Object "Fetched" to "Reference 2"
: U24 ;(Src) "User Register" 24
Mass Setting:
#_Reg_SetRange ;Set the values of the variables between and including "User Registers" 4 and 16 to 0
: 0 ;(Src)
: U4 ;(Start) "User Register" 4
: U16 ;(End) "User Register" 16
; ----------
#_Chr_SetRange ;Set the values of the variables between and including User-created "Active Variables" 33 and 35 of the Player "Fetched" to "Reference 2" to the value stored in "User Register" 5
: R5 ;(Src)
: a33 ;(Start) User-created "Active Variable" 33 of the Player "Fetched" to "Reference 2"
: a35 ;(End) User-created "Active Variable" 35 of the Player "Fetched" to "Reference 2"
; ----------
#_Obj_SetRange ;Set the values of the variables between and including "Extra Variables" 8 and 12 of the Object "Fetched" to "Reference 2" to 128
: 128 ;(Src)
: a33 ;(Start) "Extra Variable" 8 of the Object "Fetched" to "Reference 2"
: a34 ;(End) "Extra Variable" 12 of the Object "Fetched" to "Reference 2"
; ----------
#_Reg_ SetRange ;Set the values of the variables between and including the "Registers" whose IDs are stored in "User Registers" 6 and 7 to 512
: 512 ;(Src)
: R6 ;(Start) "Register" whose ID is stored in "User Register" 6
: R7 ;(End) "Register" whose ID is stored in "User Register" 7