Engine02 Script Commands - Math Operations (Equal)
Index:
Variable Copy:
| 44 | (D) (E) | Func_Reg_Equ_Reg |
| 45 | (D) (E) | Func_Reg_Equ_Const |
| 87 | (D) (E) | Func_Reg_Equ_Chr |
| 140 | (D) (E) | Func_Reg_Equ_Obj |
| 86 | (D) (E) | Func_Chr_Equ_Reg |
| 85 | (D) (E) | Func_Chr_Equ_Const |
| 327 | (D) (E) | Func_Chr_Equ_Chr |
| 141 | (D) (E) | Func_Chr_Equ_Obj |
| 143 | (D) (E) | Func_Obj_Equ_Reg |
| 144 | (D) (E) | Func_Obj_Equ_Const |
| 142 | (D) (E) | Func_Obj_Equ_Chr |
| 328 | (D) (E) | Func_Obj_Equ_Obj |
Mass Setting:
| 1281 | (D) (E) | Func_Reg_SetRange |
| 1282 | (D) (E) | Func_Chr_SetRange |
| 1283 | (D) (E) | Func_Obj_SetRange |
Descriptions:
Variable Copy:
44 - Func_Reg_Equ_Reg
45 - Func_Reg_Equ_Const
87 - Func_Reg_Equ_Chr
140 - Func_Reg_Equ_Obj
86 - Func_Chr_Equ_Reg
85 - Func_Chr_Equ_Const
327 - Func_Chr_Equ_Chr
141 - Func_Chr_Equ_Obj
143 - Func_Obj_Equ_Reg
144 - Func_Obj_Equ_Const
142 - Func_Obj_Equ_Chr
328 - Func_Obj_Equ_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:
1281 - Func_Reg_SetRange
1282 - Func_Chr_SetRange
1283 - Func_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:
# 45 ;Reg = Const (Set the value of "User Register" 7 equal to 3)
: U7 ;(Dest) "User Register" 7
: 3 ;(Src) 3
; ----------
# 327 ;Chr2 = Chr0 (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"
; ----------
# 143 ;Obj2 = 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:
#1281 ;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
; ----------
#1282 ;Chr2 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"
; ----------
#1283 ;Obj2 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"
; ----------
#1281 ;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