Engine02 Script Commands - Math Operations (Absolute Value)
Index:
Absolute Value - Overwrite original values:
| 800 | (D) (E) | Func_Abs_Reg |
| 801 | (D) (E) | Func_Abs_Chr |
| 802 | (D) (E) | Func_Abs_Obj |
Absolute Value - Preserve Original Values:
| 803 | (D) (E) | Func_Reg_Equ_Abs_Reg |
| 804 | (D) (E) | Func_Reg_Equ_Abs_Chr |
| 805 | (D) (E) | Func_Reg_Equ_Abs_Obj |
| 806 | (D) (E) | Func_Chr_Equ_Abs_Reg |
| 807 | (D) (E) | Func_Chr_Equ_Abs_Chr |
| 808 | (D) (E) | Func_Chr_Equ_Abs_Obj |
| 809 | (D) (E) | Func_Obj_Equ_Abs_Reg |
| 810 | (D) (E) | Func_Obj_Equ_Abs_Chr |
| 811 | (D) (E) | Func_Obj_Equ_Abs_Obj |
Descriptions:
Absolute Value - Overwrite original values:
800 - Func_Abs_Reg
801 - Func_Abs_Chr
802 - Func_Abs_Obj
(ALL) (Example)
These Commands convert the value of a Variable to its "Absolute Value". Negative values
become positive, and positive values remain the same.
Parameters:
- Var ID
This is the ID of the variable to convert
In the case of "Registers", "Var ID" is the ID of the "Register" whose value should be increased. 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 for the Player that is "Fetched" to "Reference 2" whose value should be increased. 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 for the Object that is "Fetched" to "Reference 2" whose value should be increased. The "E" tag may
be used to specify an "Extra" variable. Otherwise, the ID will refer to one of the
Object's standard variables
Absolute Value - Preserve Original Values:
803 - Func_Reg_Equ_Abs_Reg
804 - Func_Reg_Equ_Abs_Chr
805 - Func_Reg_Equ_Abs_Obj
806 - Func_Chr_Equ_Abs_Reg
807 - Func_Chr_Equ_Abs_Chr
808 - Func_Chr_Equ_Abs_Obj
809 - Func_Obj_Equ_Abs_Reg
810 - Func_Obj_Equ_Abs_Chr
811 - Func_Obj_Equ_Abs_Obj
(ALL) (Example)
These Commands convert the value of a Variable to its "Absolute Value". Negative values
become positive, and positive values remain the same. This Value is given to the
Destination Variable, and the Source Variable remains untouched.
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
Examples:
Absolute Value - Overwrite original values:
# 800 ;Abs Reg (Convert the value of "User Register" 3 to its "Absolute Value")
: U3 ;(Reg) "User Register" 3
; ----------
# 801 ;Abs Chr2 (Convert the value of User-created "Active Variable" 6 of the Player "Fetched" to "Reference 2" to its "Absolute Value")
: a6 ;(Chr2) User-created "Active Variable" 6 of the Player "Fetched" to "Reference 2"
; ----------
# 802 ;Abs Obj2 (Convert the value of "Extra Variable" 8 of the Object "Fetched" to "Reference 2" to its "Absolute Value")
: E8 ;(Obj2) "Extra Variable" 8 of the Object "Fetched" to "Reference 2"
Absolute Value - Preserve Original Values:
# 805 ;Reg = abs Obj0 (Obtain the "Absolute Value" of the value stored in "Extra Variable" 1 of the Object "Fetched" to "Reference 0" and place the result in "User Register" 7)
: E1 ;(Src) "Extra Variable" 1 of the Object "Fetched" to "Reference 0"
: U7 ;(Dest) "User Register" 7
; ----------
# 807 ;Chr2 = abs Chr0 (Obtain the "Absolute Value" of the value stored in User-created "Active Variable" 13 of the Player "Fetched" to "Reference 0" and place the result in User-created "Active Variable" 2 of the Player "Fetched" to "Reference 2")
: a13 ;(Src) User-created "Active Variable" 13 of the Player "Fetched" to "Reference 0"
: a2 ;(Dest) User-created "Active Variable" 2 of the Player "Fetched" to "Reference 2"
; ----------
# 809 ;Obj2 = abs Reg (Obtain the "Absolute Value" of the value stored in "User Register" 24 and place the result in "Extra Variable" 8 of the Object "Fetched" to "Reference 2")
: U24 ;(Src) "User Register" 24
: E8 ;(Dest) "Extra Variable" 8 of the Object "Fetched" to "Reference 2"