Example Object Def
The following is an example setup for an Object Def file to better demonstrate how to
put the above information into practice. Use the same format and fill in the appropriate
values given the information contained throughout the various documents to create a set of "Game Objects" for an E02 game.
;;;;;;;;;;;;;;;;;;;;;;
; Example Object Def ;
;;;;;;;;;;;;;;;;;;;;;;
Number of Sprite Sets: 2
Set 0- Num of Frames: 1
Frame 0- FileName: Objects.pcx
Width: 1 ;Blank Sprite
Height: 1
Load XOff: 1
Load YOff: 1
Draw XOff: 0
Draw YOff: 0
Back Draw XOff: 0
Back Draw YOff: 0
Main Bounds X1: 0
Y1: 0
X2: 0
Y2: 0
Num Attack Box: 0
Num Hurt Box: 0
Num Hotspots: 0
Set 1- Num of Frames: 2
Frame 0- FileName: Objects.pcx
Width: 16 ;Sprite Set 1 Frame 0
Height: 16
Load XOff: 1
Load YOff: 1
Draw XOff: -8
Draw YOff: -8
Back Draw XOff: -8
Back Draw YOff: -8
Main Bounds X1: -8
Y1: -8
X2: 8
Y2: 8
Num Attack Box: 0
Num Hurt Box: 1
Hurt 0- X1: -64
Y1: -64
X2: 64
Y2: 64
Num Hotspots: 1
Hotspot 0- X: 0
Y: 0
Frame 1- FileName: Objects.pcx
Width: 16 ;Sprite Set 1 Frame 1
Height: 16
Load XOff: 18
Load YOff: 1
Draw XOff: -8
Draw YOff: -8
Back Draw XOff: -8
Back Draw YOff: -8
Main Bounds X1: -8
Y1: -8
X2: 8
Y2: 8
Num Attack Box: 0
Num Hurt Box: 1
Hurt 0- X1: -64
Y1: -64
X2: 64
Y2: 64
Num Hotspots: 1
Hotspot 0- X: 0
Y: 0
Number of total Movement Funcs: 3
Number of Movement Func Files: 1
Movement Func File 0: objmv.def
;0- Scripted Movement Function 0
;1- Scripted Movement Function 1
;2- Scripted Movement Function 2
Number of total Projectile Collision Funcs: 0
Number of Projectile Collision Func Files: 0
Number of total Animation Funcs: 2
Number of Animation Func Files: 1
Animation Func File 0: objani.def
;0- Scripted Animation Function 0
;1- Scripted Animation Function 1
Number of total Debug Placement Funcs: 1
Number of Debug Placement Func Files: 1
Debug Placement Func File 0: objdp.def
;0- Scripted Debug Placement Function 0
Number of total Debug Drawing Funcs: 1
Number of Debug Drawing Func Files: 1
Debug Drawing Func File 0: objdd.def
;0- Scripted Debug Drawing Function 0
Number of Objects: 5
;;;;;;;;;;;
;If this Object Def were loaded as "Game-global" by a "Game Def", Entry 0 should be regarded as "invalid", and have no useful settings, as illustrated
;If this Object Def were loaded as "Zone-specific" by a "Zone Def", Entry 0 may contain a valid, useable Object Type entry
;;;;;;;;;;;
Obj 0- Blank Object
Drawing Priority: 0
Extra Variables: 0
Out Of Range Event: 0
Flags: 0
Movement Function: 0 ;Blank
Scrpt Movement Function:G65535 ;Blank
Drawing Function: 0 ;Blank
Script Drawing Function:G65535 ;Blank
Collide Function: 0 ;Blank
Script Collide Function:G65535 ;Blank
PCollide Function: 0 ;Blank
Scrpt PCollide Function:G65535 ;Blank
Debug P Function: 0 ;Blank
Script Debug P Function:G65535 ;Blank
Debug D Function: 0 ;Blank
Script Debug D Function:G65535 ;Blank
Spawn Values- None
Num Sprite Sets: 0
Num Animations: 0
Num Sounds: 0
Num Linked Objects: 0
Num Constant Lists: 0
Obj 1- Collectable Item Object, Saves
Drawing Priority: 30
Extra Variables: 0
Out Of Range Event: 0
Flags: S
Movement Function: 1 ;Just Animate
Scrpt Movement Function:G65535 ;Blank
Drawing Function: 1 ;Animated Drawing
Script Drawing Function:G65535 ;Blank
Collide Function: 1 ;Item Collision
Script Collide Function:G65535 ;Blank
PCollide Function: 0 ;Blank
Scrpt PCollide Function:G65535 ;Blank
Debug P Function: 1 ;Standard Debug Placement
Script Debug P Function:G65535 ;Blank
Debug D Function: 1 ;First-Frame Debug Drawing
Script Debug D Function:G65535 ;Blank
Spawn Values- None
Num Sprite Sets: 1
Sprite 0- Set ID: G1 ;Game Sprite Set 1
Num Animations: 1
Ani 0- Animation ID: G0 ;Game Animation 0
Num Sounds: 1
Sound 0- Sound ID: G4 ;Game Sound Effect 4 (plays when the item is picked up
Num Linked Objects: 1
Object 0- Object ID: G2 ;Game Object 2 (spawns when the item is picked up)
Num Constant Lists: 1
List 0- Num Constants: 3
Constant 0: a8 ;User-created "Active Variable" 8
Constant 1: 1 ;Item increases variable by 1
Constant 2: 999 ;Variable should not excede 999
Obj 2- Path-Mobile Script-Driven Object That Has Custom Collision With the Player, Spawned By Another Object, Not By "Debug", Doesn't Save
Drawing Priority: 30
Extra Variables: 14
Out Of Range Event: 0
Flags: 0
Movement Function: 4 ;Floor Path Movement
Scrpt Movement Function: G0 ;Game Scripted Object Movement Function 0
Drawing Function: 2 ;Animated Directional Drawing
Script Drawing Function:G65535 Blank
Collide Function: 0 ;Blank
Script Collide Function: G0 ;Game Scripted Object Collision Function 0
PCollide Function: 0 ;Blank
Scrpt PCollide Function:G65535 ;Blank
Debug P Function: 0 ;Blank
Script Debug P Function:G65535 ;Blank
Debug D Function: 0 ;Blank
Script Debug D Function:G65535 ;Blank
Spawn Values- Value 0: *0 -Reserved 1 ;Obtain initial value from spawn parameter 0
Value 1: *1 -Reserved 2 ;Obtain initial value from spawn parameter 1
Value 2: 0 -X Vel
Value 3: 0 -Y Vel
Value 4: 0 -X Count
Value 5: 0 -Y Count
Value 6: 0 -X Accel
Value 7: 0 -Y Accel
Value 8: R12 -Layer ;Obtain initial value from User Register 12 when spawned
Value 9: 0 -Edge Pause
Value 10: 4 -Slope Tolerance
Value 11: 8 -Drop Tolerance
Value 12: 8 -Rise Tolerance
Num Sprite Sets: 1
Sprite 0- Set ID: G2 ;Game Sprite Set 2
Num Animations: 2
Ani 0- Animation ID: G1 ;Game Animation 1
Ani 1- Animation ID: G1 ;Game Animation 2
Num Sounds: 0
Num Linked Objects: 0
Num Constant Lists: 0
Obj 3- Vertical PlaneSwitch Left to Plane 2, Right to Plane 3, Player must be on path for change to take effect, Saves
Drawing Priority: 30
Extra Variables: 0
Out Of Range Event: 0
Flags: S
Movement Function: 0 ;Blank
Scrpt Movement Function:G65535 ;Blank
Drawing Function: 3 ;Vertical PlaneSwitch
Script Drawing Function:G65535 ;Blank
Collide Function: 3 ;Vertical PlaneSwitch
Script Collide Function:G65535 ;Blank
PCollide Function: 0 ;Blank
Scrpt PCollide Function:G65535 ;Blank
Debug P Function: 1 ;Standard Placement
Script Debug P Function:G65535 ;Blank
Debug D Function: 3 ;Vertical PlaneSwitch
Script Debug D Function:G65535 ;Blank
Spawn Values- None
Num Sprite Sets: 1
Sprite 0- Set ID: G1 ;Game Sprites Set 1
Num Animations: 0
Num Sounds: 0
Num Linked Objects: 0
Num Constant Lists: 1
List 0- Num Constants: 3
Constant 0: 3 ;Plane ID ->
Constant 1: 2 ;Plane ID <-
Constant 2: 0 ;Must be on path
Obj 4- 4x4 Tiled Path Object That Moves Through Freespace (No Level Collision), Doesn't Save, Destroyed When out of "Activity Range"
Drawing Priority: 90
Extra Variables: 15
Out Of Range Event: 3 ;Destroy Object
Flags: 0
Movement Function: 2 ;Freespace Movement
Scrpt Movement Function:G65535 ;Blank
Drawing Function: 7 ;Level Tiled Drawing
Script Drawing Function:G65535 ;Blank
Collide Function: 4 ;Level Tiled Collision
Script Collide Function:G65535 ;Blank
PCollide Function: 0 ;Blank
Scrpt PCollide Function:G65535 ;Blank
Debug P Function: 1 ;Standard Placement
Script Debug P Function:G65535 ;Blank
Debug D Function: 4 ;Level Tiled Drawing
Script Debug D Function:G65535 ;Blank
Spawn Values- Value 0: 8 -Plat Start ;Tile Map Data starts at "Extra Variable" 8
Value 1: 0 -Reserved 2
Value 2: 0 -X Vel ;"Extra Variables" 2-7 are being used by standard freespace movement
Value 3: 0 -Y Vel
Value 4: 0 -X Count
Value 5: 0 -Y Count
Value 6: 0 -X Accel
Value 7: $32 -Y Accel
Width: 2 -Width ;Tile Map Data, begins with Height, Width, and Plane ID properties, then Map Layout Data
Height: 2 -Height
Plane: 0 -Plane
TileID 0: 12 -Tile ID 0, 0
TileID 1: 13 -Tile ID 1, 0
TileID 2: 14 -Tile ID 0, 1
TileID 3: 15 -Tile ID 1, 1
Num Sprite Sets: 0
Num Animations: 0
Num Sounds: 0
Num Linked Objects: 0
Num Constant Lists: 0