Engine02 Script Commands - Math Operations (Powers)
Index:
Raising to a Power - Preserve original values:
| (D) (E) | _Reg=Pow(Reg,Reg) |
| (D) (E) | _Reg=Pow(Reg,Const) |
| (D) (E) | _Reg=Pow(Const,Reg) |
| (D) (E) | _Reg=Pow(Chr,Reg) |
| (D) (E) | _Reg=Pow(Reg,Chr) |
| (D) (E) | _Reg=Pow(Chr,Const) |
| (D) (E) | _Reg=Pow(Const,Chr) |
| (D) (E) | _Reg=Pow(Chr,Obj) |
| (D) (E) | _Reg=Pow(Obj,Chr) |
| (D) (E) | _Reg=Pow(Chr,Chr) |
| (D) (E) | _Reg=Pow(Obj,Obj) |
| (D) (E) | _Reg=Pow(Obj,Reg) |
| (D) (E) | _Reg=Pow(Reg,Obj) |
| (D) (E) | _Reg=Pow(Obj,Const) |
| (D) (E) | _Reg=Pow(Const,Obj) |
| (D) (E) | _Chr=Pow(Reg,Reg) |
| (D) (E) | _Chr=Pow(Reg,Const) |
| (D) (E) | _Chr=Pow(Const,Reg) |
| (D) (E) | _Chr=Pow(Chr,Reg) |
| (D) (E) | _Chr=Pow(Reg,Chr) |
| (D) (E) | _Chr=Pow(Chr,Const) |
| (D) (E) | _Chr=Pow(Const,Chr) |
| (D) (E) | _Chr=Pow(Chr,Obj) |
| (D) (E) | _Chr=Pow(Obj,Chr) |
| (D) (E) | _Chr=Pow(Chr,Chr) |
| (D) (E) | _Chr=Pow(Obj,Obj) |
| (D) (E) | _Chr=Pow(Obj,Reg) |
| (D) (E) | _Chr=Pow(Reg,Obj) |
| (D) (E) | _Chr=Pow(Obj,Const) |
| (D) (E) | _Chr=Pow(Const,Obj) |
| (D) (E) | _Obj=Pow(Reg,Reg) |
| (D) (E) | _Obj=Pow(Reg,Const) |
| (D) (E) | _Obj=Pow(Const,Reg) |
| (D) (E) | _Obj=Pow(Chr,Reg) |
| (D) (E) | _Obj=Pow(Reg,Chr) |
| (D) (E) | _Obj=Pow(Chr,Const) |
| (D) (E) | _Obj=Pow(Const,Chr) |
| (D) (E) | _Obj=Pow(Chr,Obj) |
| (D) (E) | _Obj=Pow(Obj,Chr) |
| (D) (E) | _Obj=Pow(Chr,Chr) |
| (D) (E) | _Obj=Pow(Obj,Obj) |
| (D) (E) | _Obj=Pow(Obj,Reg) |
| (D) (E) | _Obj=Pow(Reg,Obj) |
| (D) (E) | _Obj=Pow(Obj,Const) |
| (D) (E) | _Obj=Pow(Const,Obj) |
Descriptions:
Raising to a Power - Preserve original values:
_Reg=Pow(Reg,Reg)
_Reg=Pow(Reg,Const)
_Reg=Pow(Const,Reg)
_Reg=Pow(Chr,Reg)
_Reg=Pow(Reg,Chr)
_Reg=Pow(Chr,Const)
_Reg=Pow(Const,Chr)
_Reg=Pow(Chr,Obj)
_Reg=Pow(Obj,Chr)
_Reg=Pow(Chr,Chr)
_Reg=Pow(Obj,Obj)
_Reg=Pow(Obj,Reg)
_Reg=Pow(Reg,Obj)
_Reg=Pow(Obj,Const)
_Reg=Pow(Const,Obj)
_Chr=Pow(Reg,Reg)
_Chr=Pow(Reg,Const)
_Chr=Pow(Const,Reg)
_Chr=Pow(Chr,Reg)
_Chr=Pow(Reg,Chr)
_Chr=Pow(Chr,Const)
_Chr=Pow(Const,Chr)
_Chr=Pow(Chr,Obj)
_Chr=Pow(Obj,Chr)
_Chr=Pow(Chr,Chr)
_Chr=Pow(Obj,Obj)
_Chr=Pow(Obj,Reg)
_Chr=Pow(Reg,Obj)
_Chr=Pow(Obj,Const)
_Chr=Pow(Const,Obj)
_Obj=Pow(Reg,Reg)
_Obj=Pow(Reg,Const)
_Obj=Pow(Const,Reg)
_Obj=Pow(Chr,Reg)
_Obj=Pow(Reg,Chr)
_Obj=Pow(Chr,Const)
_Obj=Pow(Const,Chr)
_Obj=Pow(Chr,Obj)
_Obj=Pow(Obj,Chr)
_Obj=Pow(Chr,Chr)
_Obj=Pow(Obj,Obj)
_Obj=Pow(Obj,Reg)
_Obj=Pow(Reg,Obj)
_Obj=Pow(Obj,Const)
_Obj=Pow(Const,Obj)
(ALL) (Example)
These Commands raise the value of one variable to the power of another and give the resulting
value to a third variable.
Dest = Var1 pow Var2
Raising a number to a power is multiplying the original number
by itself several times, as in the given example:
(2 pow 3) = (2 * 2 * 2) = 8
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
The value of the variable given by "Var ID 1" is raised to the power the value of the variable given by "Var ID 2",
and the result is stored in the variable given by "Dest Var ID".
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:
_Reg=Pow(Reg,Reg)
_Reg=Pow(Reg,Const)
_Reg=Pow(Const,Reg)
_Reg=Pow(Chr,Reg)
_Reg=Pow(Reg,Chr)
_Reg=Pow(Chr,Const)
_Reg=Pow(Const,Chr)
_Reg=Pow(Chr,Obj)
_Reg=Pow(Obj,Chr)
_Reg=Pow(Chr,Chr)
_Reg=Pow(Obj,Obj)
_Reg=Pow(Obj,Reg)
_Reg=Pow(Reg,Obj)
_Reg=Pow(Obj,Const)
_Reg=Pow(Const,Obj)
_Chr=Pow(Reg,Reg)
_Chr=Pow(Reg,Const)
_Chr=Pow(Const,Reg)
_Chr=Pow(Chr,Reg)
_Chr=Pow(Reg,Chr)
_Chr=Pow(Chr,Const)
_Chr=Pow(Const,Chr)
_Chr=Pow(Chr,Obj)
_Chr=Pow(Obj,Chr)
_Chr=Pow(Chr,Chr)
_Chr=Pow(Obj,Obj)
_Chr=Pow(Obj,Reg)
_Chr=Pow(Reg,Obj)
_Chr=Pow(Obj,Const)
_Chr=Pow(Const,Obj)
_Obj=Pow(Reg,Reg)
_Obj=Pow(Reg,Const)
_Obj=Pow(Const,Reg)
_Obj=Pow(Chr,Reg)
_Obj=Pow(Reg,Chr)
_Obj=Pow(Chr,Const)
_Obj=Pow(Const,Chr)
_Obj=Pow(Chr,Obj)
_Obj=Pow(Obj,Chr)
_Obj=Pow(Chr,Chr)
_Obj=Pow(Obj,Obj)
_Obj=Pow(Obj,Reg)
_Obj=Pow(Reg,Obj)
_Obj=Pow(Obj,Const)
_Obj=Pow(Const,Obj)
(Description)
#_Reg=Pow(Chr,Const) ;Raise the value of User-created "Active Variable" 18 of the Player "Fetched" to "Reference 0" to the power of 3, and place the result in "User Register" 7
: a18 ;(Chr0) User-created "Active Variable" of the Player "Fetched" to "Reference 0"
: 3 ;(Const) 3
: U7 ;(Dest) "User Register" 7
; ----------
#_Chr=Pow(Chr,Chr) ;Raise the value of User-created "Active Variable" 12 of the Player "Fetched" to "Reference 0" to the power of the value of User-created "Active Variable" 13 of the Player "Fetched" to "Reference 1", and place the result 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"
; ----------
#_Obj=Pow(Reg,Obj) ;Raise the value of "User Register" 24 to the power of the value of "Extra Variable" 4 of the Object "Fetched" to "Reference 0", and place the result 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"