Engine02 Script Commands - Math Operations (Modulus)
Index:
Remainder of Division - Preserve original values:
| 626 | (D) (E) | Func_Reg_Equ_Reg_Mod_Reg |
| 627 | (D) (E) | Func_Reg_Equ_Reg_Mod_Const |
| 628 | (D) (E) | Func_Reg_Equ_Reg_Mod_Chr |
| 629 | (D) (E) | Func_Reg_Equ_Reg_Mod_Obj |
| 630 | (D) (E) | Func_Reg_Equ_Chr_Mod_Reg |
| 631 | (D) (E) | Func_Reg_Equ_Chr_Mod_Const |
| 632 | (D) (E) | Func_Reg_Equ_Chr_Mod_Chr |
| 633 | (D) (E) | Func_Reg_Equ_Chr_Mod_Obj |
| 634 | (D) (E) | Func_Reg_Equ_Obj_Mod_Reg |
| 635 | (D) (E) | Func_Reg_Equ_Obj_Mod_Const |
| 636 | (D) (E) | Func_Reg_Equ_Obj_Mod_Chr |
| 637 | (D) (E) | Func_Reg_Equ_Obj_Mod_Obj |
| 638 | (D) (E) | Func_Chr_Equ_Reg_Mod_Reg |
| 639 | (D) (E) | Func_Chr_Equ_Reg_Mod_Const |
| 640 | (D) (E) | Func_Chr_Equ_Reg_Mod_Chr |
| 641 | (D) (E) | Func_Chr_Equ_Reg_Mod_Obj |
| 642 | (D) (E) | Func_Chr_Equ_Chr_Mod_Reg |
| 643 | (D) (E) | Func_Chr_Equ_Chr_Mod_Const |
| 644 | (D) (E) | Func_Chr_Equ_Chr_Mod_Chr |
| 645 | (D) (E) | Func_Chr_Equ_Chr_Mod_Obj |
| 646 | (D) (E) | Func_Chr_Equ_Obj_Mod_Reg |
| 647 | (D) (E) | Func_Chr_Equ_Obj_Mod_Const |
| 648 | (D) (E) | Func_Chr_Equ_Obj_Mod_Chr |
| 649 | (D) (E) | Func_Chr_Equ_Obj_Mod_Obj |
| 650 | (D) (E) | Func_Obj_Equ_Reg_Mod_Reg |
| 651 | (D) (E) | Func_Obj_Equ_Reg_Mod_Const |
| 652 | (D) (E) | Func_Obj_Equ_Reg_Mod_Chr |
| 653 | (D) (E) | Func_Obj_Equ_Reg_Mod_Obj |
| 654 | (D) (E) | Func_Obj_Equ_Chr_Mod_Reg |
| 655 | (D) (E) | Func_Obj_Equ_Chr_Mod_Const |
| 656 | (D) (E) | Func_Obj_Equ_Chr_Mod_Chr |
| 657 | (D) (E) | Func_Obj_Equ_Chr_Mod_Obj |
| 658 | (D) (E) | Func_Obj_Equ_Obj_Mod_Reg |
| 659 | (D) (E) | Func_Obj_Equ_Obj_Mod_Const |
| 660 | (D) (E) | Func_Obj_Equ_Obj_Mod_Chr |
| 661 | (D) (E) | Func_Obj_Equ_Obj_Mod_Obj |
Remainder of Division - Overwrite original values:
| 1004 | (D) (E) | Func_Reg_ModEqu_Reg |
| 1014 | (D) (E) | Func_Reg_ModEqu_Chr |
| 1024 | (D) (E) | Func_Reg_ModEqu_Obj |
| 1034 | (D) (E) | Func_Reg_ModEqu_Const |
| 1044 | (D) (E) | Func_Chr_ModEqu_Reg |
| 1054 | (D) (E) | Func_Chr_ModEqu_Chr |
| 1064 | (D) (E) | Func_Chr_ModEqu_Obj |
| 1074 | (D) (E) | Func_Chr_ModEqu_Const |
| 1084 | (D) (E) | Func_Obj_ModEqu_Reg |
| 1094 | (D) (E) | Func_Obj_ModEqu_Chr |
| 1104 | (D) (E) | Func_Obj_ModEqu_Obj |
| 1114 | (D) (E) | Func_Obj_ModEqu_Const |
Descriptions:
Remainder of Division - Preserve original values:
626 - Func_Reg_Equ_Reg_Mod_Reg
627 - Func_Reg_Equ_Reg_Mod_Const
628 - Func_Reg_Equ_Reg_Mod_Chr
629 - Func_Reg_Equ_Reg_Mod_Obj
630 - Func_Reg_Equ_Chr_Mod_Reg
631 - Func_Reg_Equ_Chr_Mod_Const
632 - Func_Reg_Equ_Chr_Mod_Chr
633 - Func_Reg_Equ_Chr_Mod_Obj
634 - Func_Reg_Equ_Obj_Mod_Reg
635 - Func_Reg_Equ_Obj_Mod_Const
636 - Func_Reg_Equ_Obj_Mod_Chr
637 - Func_Reg_Equ_Obj_Mod_Obj
638 - Func_Chr_Equ_Reg_Mod_Reg
639 - Func_Chr_Equ_Reg_Mod_Const
640 - Func_Chr_Equ_Reg_Mod_Chr
641 - Func_Chr_Equ_Reg_Mod_Obj
642 - Func_Chr_Equ_Chr_Mod_Reg
643 - Func_Chr_Equ_Chr_Mod_Const
644 - Func_Chr_Equ_Chr_Mod_Chr
645 - Func_Chr_Equ_Chr_Mod_Obj
646 - Func_Chr_Equ_Obj_Mod_Reg
647 - Func_Chr_Equ_Obj_Mod_Const
648 - Func_Chr_Equ_Obj_Mod_Chr
649 - Func_Chr_Equ_Obj_Mod_Obj
650 - Func_Obj_Equ_Reg_Mod_Reg
651 - Func_Obj_Equ_Reg_Mod_Const
652 - Func_Obj_Equ_Reg_Mod_Chr
653 - Func_Obj_Equ_Reg_Mod_Obj
654 - Func_Obj_Equ_Chr_Mod_Reg
655 - Func_Obj_Equ_Chr_Mod_Const
656 - Func_Obj_Equ_Chr_Mod_Chr
657 - Func_Obj_Equ_Chr_Mod_Obj
658 - Func_Obj_Equ_Obj_Mod_Reg
659 - Func_Obj_Equ_Obj_Mod_Const
660 - Func_Obj_Equ_Obj_Mod_Chr
661 - Func_Obj_Equ_Obj_Mod_Obj
(ALL) (Example)
These Commands find the modulus (remainder of division) between two variables and give the
resulting value to a third variable
Dest = Var1 % Var2
In the case of two Players, Var 1 is read from the Player "Fetched" to "Reference 0", and Var 2 is
read from the Player "Fetched" to "Reference 1"
In the case of two Objects, Var 1 is read from the Object "Fetched" to "Reference 0", and Var 2 is
read from the Object "Fetched" to "Reference 1"
In the case that only one Player is used for input, and/or only one Object is used for input, the Player
"Fetched" to "Reference 0" is used, and the Object "Fetched" to "Reference 0" is used.
The Destination variable is always considered to be from the Object or Player "Fetched" to "Reference 2"
Parameters:
- Var ID 1
- Var ID 2
- Dest Var ID
"Var ID 1" and "Var ID 2" are the IDs of the variables on which to perform the division,
(Value of Variable 1 is divided by value of variable 2) and "Dest Var ID" is the ID of the
variable in which to store the remainder of the division.
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.
Remainder of Division - Overwrite original values:
1004 - Func_Reg_ModEqu_Reg
1014 - Func_Reg_ModEqu_Chr
1024 - Func_Reg_ModEqu_Obj
1034 - Func_Reg_ModEqu_Const
1044 - Func_Chr_ModEqu_Reg
1054 - Func_Chr_ModEqu_Chr
1064 - Func_Chr_ModEqu_Obj
1074 - Func_Chr_ModEqu_Const
1084 - Func_Obj_ModEqu_Reg
1094 - Func_Obj_ModEqu_Chr
1104 - Func_Obj_ModEqu_Obj
1114 - Func_Obj_ModEqu_Const
(ALL) (Example)
These Commands find the modulus (remainder of division) between the given Destination variable and the
given Source variable, and places it into the given Destination variable, overwriting its previous contents.
Dest %= Src
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
"Dest" is divided by "Src", and the remainder of that division is placed into "Dest"
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.
Examples:
Remainder of Division - Preserve original values:
# 631 ;Reg = Chr0 % Const (Divide the value of User-created "Active Variable" 18 of the Player "Fetched" to "Reference 0" by 300, and place the remainder in "User Register" 7)
: a18 ;(Chr0) User-created "Active Variable" of the Player "Fetched" to "Reference 0"
: 300 ;(Const) 300
: U7 ;(Dest) "User Register" 7
; ----------
# 644 ;Chr2 = Chr0 % Chr1 (Divide the value of User-created "Active Variable" 12 of the Player "Fetched" to "Reference 0" by the value of User-created "Active Variable" 13 of the Player "Fetched" to "Reference 1", and place the remainder in User-created "Active Variable" 2 of the Player "Fetched" to "Reference 2")
: a12 ;(Chr0) User-created "Active Variable" 12 of the Player "Fetched" to "Reference 0"
: a13 ;(Chr1) User-created "Active Variable" 13 of the Player "Fetched" to "Reference 1"
: a2 ;(Dest) User-created "Active Variable" 2 of the Player "Fetched" to "Reference 2"
; ----------
# 653 ;Obj2 = Reg % Obj0 (Divide the value of "User Register" 24 by the value of "Extra Variable" 4 of the Object "Fetched" to "Reference 0", and place the remainder in "Extra Variable" 8 of the Object "Fetched" to "Reference 2")
: U24 ;(Reg) "User Register" 24
: E4 ;(Obj0) "Extra Variable" 4 of the Object "Fetched" to "Reference 0"
: E8 ;(Dest) "Extra Variable" 8 of the Object "Fetched" to "Reference 2"
Remainder of Division - Overwrite original values:
#1024 ;Reg %= Obj0 (Divide the value of "User Register" 3 of the Player "Fetched" by the value of "Extra Variable" 4 of the Object "Fetched" to "Reference 0", and place the remainder back into "User Register" 3)
: E1 ;(Chr0) "Extra Variable" 4 of the Object "Fetched" to "Reference 0"
: U3 ;(Dest) "User Register" 3
; ----------
#1054 ;Chr2 %= Chr0 (Divide the value of User-created "Active Variable" 6 of the Player "Fetched" to "Reference 2" by the value of User-created "Active Variable" 9 of the Player "Fetched" to "Reference 0", and place the remainder back into User-created "Active Variable" 6 of the Player "Fetched" to "Reference 2")
: a9 ;(Chr0) User-created "Active Variable" 9 of the Player "Fetched" to "Reference 0"
: a6 ;(Dest) User-created "Active Variable" 6 of the Player "Fetched" to "Reference 2"
; ----------
#1114 ;Obj2 %= Const (Divide the value of "Extra Variable" 8 of the Object "Fetched" to "Reference 2" by 12, and place the remainder back into "Extra Variable" 8 of the Object "Fetched" to "Reference 2")
: 12 ;(Const) 12
: E8 ;(Dest) "Extra Variable" 8 of the Object "Fetched" to "Reference 2"