Dest Reg
ID of the Register into which to store the retrieved Collision Area ID.
The "U" tag may be used to specify a user-defined Register. Otherwise, the ID will refer to a Game Register
A value of "255" means that the Object is not within "Activity Range"
There are 9 "Collision Areas" that
correspond with the different sides of the looping level area in the following way:
-------------------------
| | | |
| 0 | 1 | 2 | Above Loop
| | | |
-------------------------
| | | |
| 3 | 4 | 5 | Center (no loop)
| | | |
-------------------------
| | | |
| 6 | 7 | 8 | Below Loop
| | | |
-------------------------
Left Center Right
Of (no of
Loop loop) Loop
Setting the "Current Object":
1199 - Func_Set_CurrObj_Reg
1200 - Func_Set_CurrObj_Chr
1201 - Func_Set_CurrObj_Obj
(ALL) (Example)
Sets the the Object whose pointer is stored in the given variable as the "Current Object"
This Command is meant to be used in Functions that are not a part of normal Object processing,
so that Commands that read or manipulate the "Current Object" can still be used as desired.
This Command can be used to switch the "Current Object" during Object processing Functions such
as Object movement, animation, and collision Functions, but in
these cases, the original "Current Object" must be restored when finished
Parameters:
- Var ID
In the case of "Registers", "Var ID" is the ID of the "Register" that contains the pointer. 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 contains the pointer. 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 contains the pointer. The "E" tag may
be used to specify an "Extra" variable. Otherwise, the ID will refer to one of the
Object's standard variables
Setting the "Current Projectile":
1219 - Func_Set_CurrProjectile_Reg
1220 - Func_Set_CurrProjectile_Chr
1221 - Func_Set_CurrProjectile_Obj
(ALL) (Example)
Sets the Object whose pointer is stored in the given variable as the "Current Projectile"
This Command is meant to be used in Functions that are not a part of normal Object processing,
so that Commands that read or manipulate the "Current Object" can still be used as desired.
This Command can be used to switch the "Current Object" during Object processing Functions such
as Object movement, animation, and collision Functions, but in
these cases, the original "Current Object" must be restored when finished
Parameters:
- Var ID
In the case of "Registers", "Var ID" is the ID of the "Register" that contains the pointer. 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 contains the pointer. 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 contains the pointer. The "E" tag may
be used to specify an "Extra" variable. Otherwise, the ID will refer to one of the
Object's standard variables
Collision Box Offsets:
1217 - Func_Player_Get_Object_Boundary_Offset
1218 - Func_Projectile_Get_Object_Boundary_Offset
(ALL) (Example)
Obtains the distance between a certain part of the "Current Object" and a certain
part of the "Current Player" or "Current Projectile", and places it in the given Player Variable or Object Variable
Parameters:
- Player/Projectile Boundary
The part of the Player/Projectile that will be tested:
0 - Top of the Player's MainBounds Box
1 - Bottom of the Player's MainBounds Box
2 - Left of the Player's MainBounds Box
3 - Right of the Player's MainBounds Box
4 - Horizontal Center of the Player's MainBounds Box
5 - Vertical Center of the Player's MainBounds Box
6 - Player's X Position
7 - Player's Y Position
- Object Boundary
The part of the Object that will be tested (depends on the "Player/Projectile Boundary" setting):
0 - Top or Left of the Object's MainBounds Box
1 - Bottom or right of the Object's MainBounds Box
2 - Horizontal or Vertical center of the Object's MainBounds Box
3 - Object's X or Y Position
- Var ID
In the case of Players, "Var ID" is the ID of the Player Variable within the "Current Player" that should recieve the distance value. 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 Projectiles, "Var ID" is the ID of the Object Variable within the "Current Projectile" that should recieve the distance value. The "E" tag may
be used to specify an "Extra" variable. Otherwise, the ID will refer to one of the
Object's standard variables
Drawing:
1408 - Func_DebugDraw
(ALL) (Example)
Draws the "Current Object" to the screen, based on the given Parameters
Parameters:
- Sprite Set ID
- Sprite Frame ID
ID of the desired Sprite Frame within the given Sprite Set
- XOff
- YOff
X and Y offsets from the "Current Object"'s X/Y Position at which to draw the given Sprite Frame
- Draw Dir
The direction in which to draw the given Sprite Frame:
0 - Normal
1 - Horizontally Mirrored
2 - Vertically Flipped
3 - Flipped and Mirrored
Examples:
1132 - Func_Player_PlaceObject
(Description)
#1132 ;Player Place Object (Run the Built-in and Scripted Object Debug Placement Functions for the Object Type whose ID is stored in "Active Variable" 35 [Player_DebugNum] of the "Current Player")
Object Priority:
1436 - Func_Change_FetchedObject_Priority
1437 - Func_Change_CurrObject_Priority
(Description)
#1436 ;Change FetchedObject Priority (Change the Priority of the Object currently "Fetched" to "Reference 2" to 32)
: 32 ;(Priority) New Priority value should be 32
; ----------
#1437 ;Change CurrObject Priority (Change the Priority of the "Current Object" to the value stored in user register 9)
: U9 ;(Priority) Value stored in User Register 8
Object Destruction:
# 88 ;Destroy Current Object ("Destroy" the "Current Object")
Object Fetching:
# 138 ;FetchObject By ID ("Fetch" the first Object in the active Objects list to Reference 2)
: 2 ;Reference 2
: 0 ;Object at entry 0 in the active Objects list
; ----------
# 138 ;FetchObject By ID ("Fetch" the Object whose entry ID in the active Objects list is stored in User Register 4 to References 0, 1, and 2)
: 6 ;All References
: R4 ;Value stored in User Register 4
139 - Func_FetchObject_Current
(Description)
# 139 ;FetchObject Current ("Fetch" the "Current Object" to Reference 0)
: 0 ;Reference 0
; ----------
# 139 ;FetchObject Current ("Fetch" the "Current Object" to References 0 and 2)
: 5 ;References 0 and 2
324 - Func_FetchObject_Last_Spawned
(Description)
# 324 ;FetchObject Last Spawned ("Fetch" the Object that was last Spawned to Reference 2)
: 2 ;Reference 2
; ----------
# 324 ;FetchObject Last Spawned ("Fetch" the Object that was last Spawned to References 0, 1, and 2)
: 6 ;All References
349 - Func_FetchObject_Current_Projectile
(Description)
# 394 ;FetchObject Current Projectile ("Fetch" the "Current Projectile" to Reference 0)
: 0 ;Reference 0
; ----------
# 394 ;FetchObject Current Projectile ("Fetch" the "Current Projectile" to References 0 and 2)
: 5 ;References 0 and 2
371 - Func_FetchObject_Current_Parent
(Description)
# 371 ;FetchObject Current Parent ("Fetch" the "Parent Object" of the "Current Object" to Reference 2)
: 2 ;Reference 2
; ----------
# 371 ;FetchObject Current Parent ("Fetch" the "Parent Object" of the "Current Object" to References 0, 1, and 2)
: 6 ;All References
372 - Func_FetchObject_Current_Child
(Description)
# 372 ;FetchObject Current Parent ("Fetch" "Child Object" 0 of the "Current Object" to References 0 and 2)
: 5 ;References 0 and 2
: 0 ;Child Object 0
; ----------
# 372 ;FetchObject Current Parent ("Fetch" the "Child Object" of the "Current Object" whose Entry ID in that Object's "Child List" is stored in User Register 1 to References 0, 1, and 2)
: 6 ;All References
: R1 ;Value of User Register 1
373 - Func_FetchObject_Fetched_Parent
(Description)
# 373 ;FetchObject Current Parent ("Fetch" the "Parent Object" of the Object currently "Fetched" to "Reference 0" to Reference 2)
: 2 ;Reference 2
; ----------
# 373 ;FetchObject Fetched Parent ("Fetch" the "Parent Object" of the Object currently "Fetched" to "Reference 0" to References 0, 1, and 2)
: 6 ;All References
374 - Func_FetchObject_Fetched_Child
(Description)
# 374 ;FetchObject Current Parent ("Fetch" "Child Object" 0 of the Object currently "Fetched" to "Reference 0" to References 0 and 2)
: 5 ;References 0 and 2
: 0 ;Child Object 0
; ----------
# 374 ;FetchObject Fetched Parent ("Fetch" the "Child Object" of the Object currently "Fetched" to "Reference 0" whose Entry ID in that Object's "Child List" is stored in User Register 1 to References 0, 1, and 2)
: 6 ;All References
: R1 ;Value of User Register 1
995 - Func_FetchObject_Reg
996 - Func_FetchObject_Curr_Chr
997 - Func_FetchObject_Curr_Obj
998 - Func_FetchObject_Fetched_Chr
999 - Func_FetchObject_Fetched_Obj
(Description)
# 995 ;FetchObject Reg (Fetch the Object whose pointer is stored in User Register 4 to Reference 0, Reference 1, and Reference 2)
: 6 ;All References
: U4 ;User Register 4
; ----------
# 996 ;FetchObject Curr Chr (Fetch the Object whose pointer is stored in User-created "Active Variable" 32 of the "Current Player" to Reference 2)
: 2 ;Reference 2
: a32 ;User-created "Active Variable" 32 of the "Current Player"
; ----------
# 999 ;FetchObject Fetched Obj (Fetch the Object whose pointer is stored in "Extra Variable" 8 of the Object "Fetched" to Reference 0 to Reference 1 and Reference 2)
: 4 ;References 1 and 2
: E8 ;"Extra Variable" 8 of the Object "Fetched" to Reference 0
1247 - Func_CopyFetch_Object
(Description)
#1247 ;CopyFetch Object (Fetch the Object Fetched to Reference 1 to Reference 2 [Both will reference the Object originally referenced by Reference 1])
: 1 ;(Src) Reference 1
: 2 ;(Dest) Reference 2
; ----------
#1247 ;CopyFetch Object (Fetch the Object Fetched to Reference 2 to both Reference 0 and Reference 1 [All three will reference the Object originally referenced by Reference 2])
: 2 ;(Src) Reference 2
: 3 ;(Dest) References 0 and 1
1249 - Func_SwapFetch_Object
(Description)
#1249 ;SwapFetch Object (Swap the Objects that were Fetched to References 0 and 2 [Ex: If Reference 0 previously referenced Object 1, and Reference 2 previously referenced Object 2, then Reference 0 will now reference Object 2, and Reference 2 will now reference Object 1])
: 2 ;References 0 and 2
Parent/Child Relation:
# 375 ;Set FetchedObj Parent (Set the Object "Fetched" to "Reference 0" as the "Parent Object" of the Object "Fetched" to "Reference 2")
376 - Func_Set_Fetched_Obj_Child
(Description)
# 376 ;Set FetchedObj Child (Set the Object "Fetched" to "Reference 0" as the 5th "Child Object" of the Object "Fetched" to "Reference 2")
: 5 ;Child Object Entry 5
; ----------
# 376 ;Set FetchedObj Child (Set the Object "Fetched" to "Reference 0" as a"Child Object" of the Object "Fetched" to "Reference 2", entered into that Object's "Child List" at the position specified by the value of User Register 7)
: U7 ;Value stored in User Register 7
377 - Func_Set_Curr_Obj_Parent
(Description)
# 377 ;Set CurrObj Parent (Set the Object "Fetched" to "Reference 0" as the "Parent Object" of the "Current Object")
378 - Func_Set_Curr_Obj_Child
(Description)
# 378 ;Set CurrObj Child (Set the Object "Fetched" to "Reference 0" as the 2nd "Child Object" of the "Current Object")
: 2 ;Child Object Entry 2
; ----------
# 378 ;Set CurrObj Child (Set the Object "Fetched" to "Reference 0" as a"Child Object" of the "Current Object", entered into that Object's "Child List" at the position specified by the value of User Register 8)
: U8 ;Value stored in User Register 8
Projectile Collision Testing:
844 - Func_Current_Projectile_Test_Collisions
(Description)
# 844 ;Current Projectile Test Collisions (Cause the "Current Object" to become the "Current Projectile" and test for Collisions with all Objects within "Activity Range")
845 - Func_Fetched_Projectile_Test_Collisions
(Description)
# 845 ;Fetched Projectile Test Collisions (Cause the Object "Fetched" to "Reference 2" to become the "Current Projectile" and test for Collisions with all Objects within "Activity Range")
Function Control:
1152 - Func_Call_Function_CurrObject_Const
1153 - Func_Call_Function_CurrObject_Obj
1155 - Func_Run_Function_CurrObject_Const
1156 - Func_Run_Function_CurrObject_Obj
1158 - Func_Stop_Function_CurrObject_Const
1159 - Func_Stop_Function_CurrObject_Obj
1161 - Func_Call_Function_FetchedObject_Const
1162 - Func_Call_Function_FetchedObject_Obj
1164 - Func_Run_Function_FetchedObject_Const
1165 - Func_Run_Function_FetchedObject_Obj
1167 - Func_Stop_Function_FetchedObject_Const
1168 - Func_Stop_Function_FetchedObject_Obj
(Description)
#1152 ;Call Function CurrObject Const (Cause the "Current Object" to queue Game-global Object Movement Function 10)
: G10 ;Game-global Object MovementFunction 10
; ----------
#1155 ;Run Function CurrObject Const (Cause the "Current Object" to queue and immediately process the Object Movement Function whose "Full List ID" value is stored in User Register 2)
: R2 ;Value stored in User Register 2"
; ----------
#1168 ;Stop Function FetchedObject Obj (Cause the Object "Fetched" to "Reference 2" to remove from its queue the Object Movement Function whose "Full List ID" value is stored in "Extra Variable" 9 of the Object "Fetched" to "Reference 2")
: E9 ;"Extra Variable" 9 of the Object "Fetched" to "Reference 2"
1154 - Func_Call_Function_CurrObject_OConst
1157 - Func_Run_Function_CurrObject_OConst
1160 - Func_Stop_Function_CurrObject_OConst
1163 - Func_Call_Function_FetchedObject_OConst
1166 - Func_Run_Function_FetchedObject_OConst
1169 - Func_Stop_Function_FetchedObject_OConst
(Description)
#1154 ;Call Function CurrObject OConst (Cause the "Current Object" to queue the Object Movement Function whose ID is listed for "Constant" 10 of the Object Type's "Constant List" 0)
: 0 ;Object Type's "Constant List" 0
: 10 ;"Constant" 10 from the Object Type's "Constant List" 0
; ----------
#1157 ;Run Function CurrObject OConst (Cause the "Current Object" to queue and immediately process the Object Movement Function whose ID is listed for "Constant" 4 of the Object Type's "Constant List" 7)
: 4 ;Object Type's "Constant List" 4
: 7 ;"Constant" 7 from the Object Type's "Constant List" 4
; ----------
#1169 ;Stop Function FetchedObject OConst (Cause the Object "Fetched" to "Reference 2" to remove from its queue the Object Movement Function whose ID is listed for "Constant" 2 of the Object Type's "Constant List" 1)
: 2 ;Object Type's "Constant List" 2
: 1 ;"Constant" 1 from the Object Type's "Constant List" 2
Object Pointers:
979 - Func_Reg_Equ_Pointer_Curr_Obj
981 - Func_Chr_Equ_Pointer_Curr_Obj
983 - Func_Obj_Equ_Pointer_Curr_Obj
985 - Func_Reg_Equ_Pointer_Fetched_Obj
987 - Func_Chr_Equ_Pointer_Fetched_Obj
989 - Func_Obj_Equ_Pointer_Fetched_Obj
(Description)
# 979 ;Reg = Ptr to CurrObject (Store a pointer to the "Current Object" in User Register 7)
: U7 ;User Register 7
; ----------
# 987 ;Chr2 = Ptr to FetchedObject (Store a pointer to the Object "Fetched" to "Reference 0" in User-created "Active Variable" 11 of the Player "Fetched" to "Reference 2")
: a11 ;User-created "Active Variable" 11 of the Player "Fetched" to "Reference 2"
; ----------
# 989 ;Obj2 = Ptr to FetchedObject (Store a pointer to the Object "Fetched" to "Reference 0" in "Extra Variable" 0 of the Object "Fetched" to "Reference 2")
: E0 ;"Extra Variable" 0 of the Object "Fetched" to "Reference 2"
Object Saving:
# 1133 ;Save Objects (Save Object Layout to the file whose name is stored in the current "Zone"'s Zone Def as "Text" 2)
: Z2 ;Filename stored in Zone Def "Text" 2
; ----------
# 1133 ;Save Objects (Save Object Layout back to the file that was last loaded)
: Current ;The last Object Layout file that was loaded
Object Suspension:
1179 - Func_Stop_Current_Object
1180 - Func_Stop_Fetched_Object
(Description)
#1179 ;Stop Current Object ("Destroy" the "Current Object" by stopping all of its Functions and Animations, and turning it into an intangible dummy that can still reset when out of activity range)
: 20 ;Game-global Object Type 20 (Assumed to use no Built-in or Scripted Functions or Animations, and to be set to reset when outside of "Activity Range")
; ----------
#1180 ;Stop Fetched Object ("Destroy" the Object "Fetched" to "Reference 2) by stopping all of its Functions and Animations, and turning it into an intangible dummy that can still reset when out of activity range)
: 15 ;Game-global Object Type 15 (Assumed to use no Built-in or Scripted Functions or Animations, and to be set to reset when outside of "Activity Range")
Collision Area:
#1183 ;Get Object Collision Area (Obtain the "Collision Area" of the "Current Object" in relation to Player 1's screen, and store it in User Register 14)
: 0 ;Player 1; the top/single screen
: U14 ;User Register 14
1199 - Func_Set_CurrObj_Reg
1200 - Func_Set_CurrObj_Chr
1201 - Func_Set_CurrObj_Obj
(Description)
#1429 ;Set CurrObject Reg (Set the Object whose pointer is stored in User Register 20 as the "Current Object")
: U20 ;User Register 20
; ----------
#1430 ;Set CurrObject Chr (Set the Object whose pointer is stored in User-created "Active Variable" 1 of the Player "Fetched" to "Reference 0" as the "Current Object")
: a1 ;User-created "Active Variable" 1 of the Player "Fetched" to "Reference 0"
; ----------
#1431 ;Set CurrObject Obj (Set the Object whose pointer is stored in "Extra Variable" 8 of the Object "Fetched" to "Reference 0" as the "Current Object")
: E8 ;"Extra Variable" 8 of the Object "Fetched" to "Reference 0"
Setting the "Current Projectile":
1219 - Func_Set_CurrProjectile_Reg
1220 - Func_Set_CurrProjectile_Chr
1221 - Func_Set_CurrProjectile_Obj
(Description)
#1429 ;Set CurrProjectile Reg (Set the Object whose pointer is stored in User Register 20 as the "Current Projectile")
: U20 ;User Register 20
; ----------
#1430 ;Set CurrProjectile Chr (Set the Object whose pointer is stored in User-created "Active Variable" 1 of the Player "Fetched" to "Reference 0" as the "Current Projectile")
: a1 ;User-created "Active Variable" 1 of the Player "Fetched" to "Reference 0"
; ----------
#1431 ;Set CurrProjectile Obj (Set the Object whose pointer is stored in "Extra Variable" 8 of the Object "Fetched" to "Reference 0" as the "Current Projectile")
: E8 ;"Extra Variable" 8 of the Object "Fetched" to "Reference 0"
Collision Box Offsets:
1217 - Func_Player_Get_Object_Boundary_Offset
1218 - Func_Projectile_Get_Object_Boundary_Offset
(Description)
#1217 ;Player Get Object Boundary Offset (Objtain the distance between the Right Side of the MainBounds Box of the "Current Player" and the Right Side of the MainBounds Box of the "Current Object", and place the value in User-created "Active Variable" 25 of the "Current Player")
: 3 ;(Chr) Right Boundary
: 1 ;(Obj) Right Boundary
: a25 ;(Dest) User-created "Active Variable" 25 of the "Current Player"
; ----------
#1218 ;Projectile Get Object Boundary Offset (Objtain the distance between the Top Side of the MainBounds Box of the "Current Projectile" and the Top Side of the MainBounds Box of the "Current Object", and place the value in "Extra Variable" 10 of the "Current Projectile)
: 0 ;(Chr) Top Boundary
: 0 ;(Obj) Top Boundary
: E10 ;(Dest) "Extra Variable" 10 of the "Current Projectile"
Drawing:
#1408 ;Debug Draw (Draw Sprite Frame 0 of Sprite Set 0 of the "Current Object" at an offset of -16,-8 from the Object's current X/Y Position, with normal orientation)
: 0 ;(Set)
: 0 ;(Frame)
: -16 ;(XOff)
: -8 ;(YOff)
: 0 ;(Dir) Normal
; ----------
#1408 ;Debug Draw (Using the Sprite Frame whose ID is stored in User Register 5, and the Sprite Set whose ID is stored in User Register 6, draw a Sprite from the "Current Object" using the values of User Registers 7 and 8 as X and Y offsets from the Object's current X/Y Position, with flipped and mirrored orientation)
: R5 ;(Set) Value of User Register 5
: R6 ;(Frame) Value of User Register 6
: R7 ;(XOff) Value of User Register 7
: R8 ;(YOff) Value of User Register 8
: 3 ;(Dir) Flipped and Mirrored