Engine02 Script Commands - Math Operations (Negation)
Index:
Negation - Overwrite original values:
| 788 | (D) (E) | Func_Neg_Reg |
| 789 | (D) (E) | Func_Neg_Chr |
| 790 | (D) (E) | Func_Neg_Obj |
Negation - Preserve Original Values:
| 791 | (D) (E) | Func_Reg_Equ_Neg_Reg |
| 792 | (D) (E) | Func_Reg_Equ_Neg_Chr |
| 793 | (D) (E) | Func_Reg_Equ_Neg_Obj |
| 794 | (D) (E) | Func_Chr_Equ_Neg_Reg |
| 795 | (D) (E) | Func_Chr_Equ_Neg_Chr |
| 796 | (D) (E) | Func_Chr_Equ_Neg_Obj |
| 797 | (D) (E) | Func_Obj_Equ_Neg_Reg |
| 798 | (D) (E) | Func_Obj_Equ_Neg_Chr |
| 799 | (D) (E) | Func_Obj_Equ_Neg_Obj |
Descriptions:
Negation - Overwrite original values:
788 - Func_Neg_Reg
789 - Func_Neg_Chr
790 - Func_Neg_Obj
(ALL) (Example)
These Commands negate the value of a Variable. Negative values become positive, and
positive values become negative.
Parameters:
- Var ID
This is the ID of the variable to negate
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
Negation - Preserve Original Values:
791 - Func_Reg_Equ_Neg_Reg
792 - Func_Reg_Equ_Neg_Chr
793 - Func_Reg_Equ_Neg_Obj
794 - Func_Chr_Equ_Neg_Reg
795 - Func_Chr_Equ_Neg_Chr
796 - Func_Chr_Equ_Neg_Obj
797 - Func_Obj_Equ_Neg_Reg
798 - Func_Obj_Equ_Neg_Chr
799 - Func_Obj_Equ_Neg_Obj
(ALL) (Example)
These Commands negate the value of a Variable. Negative values become positive, and
positive values become negative. 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:
Negation - Overwrite original values:
# 788 ;Negate Reg (Negate the value of "User Register" 3)
: U3 ;(Reg) "User Register" 3
; ----------
# 789 ;Negate Chr2 (Negate the value of User-created "Active Variable" 6 of the Player "Fetched" to "Reference 2")
: a6 ;(Chr2) User-created "Active Variable" 6 of the Player "Fetched" to "Reference 2"
; ----------
# 790 ;Negate Obj2 (Negate the value of "Extra Variable" 8 of the Object "Fetched" to "Reference 2")
: E8 ;(Obj2) "Extra Variable" 8 of the Object "Fetched" to "Reference 2"
Negation - Preserve Original Values:
# 793 ;Reg = Neg Obj0 (Obtain the negated version 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
; ----------
# 795 ;Chr2 = Neg Chr0 (Obtain the negated version 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"
; ----------
# 797 ;Obj2 = Neg Reg (Obtain the negated version 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"