- Saves the fastest time to the Multistorey Mayhem stat
- 0400: save_mayhem_time [int]
- Integer value
This opcode saves the lowest value to the "Multistorey Mayhem in secs" stat (GXT key
FEST_RM). The stat initially starts with a value of 0 and does not appear in the stats menu until its value is greater than 0. Any value can overwrite a value of 0. For every other values, only those lower than the saved value will update the stat with the new value; higher values have no effect on the stat. The value set with this opcode is saved in block 17 of the save file.
- Stores a point offset from the object's position
- 0400: create_coordinate [var1] [var2] [var3] from_object [object handle] offset [flt1] [flt2] [flt3]
- [object handle]
- The handle of the object
- Distance to offset from the object's right side
- Distance to offset from the object's front side
- Distance to offset from the object's top side
- Variable to store the offset x-coordinate
- Variable to store the offset y-coordinate
- Variable to store the offset z-coordinate
- Native analog
This opcode stores a point offset from the object's position. The coordinates it stores are dependent on the direction the object is facing. If you set the offsets to 0.0, it is better to use opcode 01BB instead since you are getting the object's own position.
The following example, using Sanny Builder, will spawn a pistol object at the player character. Pressing button 4 (ACTION key on foot) will spawn an adrenaline pickup rotating around the pistol object.
// set constants const X_POS = [email protected] Y_POS = [email protected] Z_POS = [email protected] ANGLE = [email protected] SPAWNED_OBJECT = [email protected] SPAWNED_PICKUP = [email protected] end // spawn object 00A0: store_actor $PLAYER_ACTOR position_to X_POS Y_POS Z_POS 0107: SPAWNED_OBJECT = create_object #COLT45 at X_POS Y_POS Z_POS // spawn pickup and rotate object while true wait 10 if 00E1: key_pressed 0 4 // action key then 0176: ANGLE = object SPAWNED_OBJECT z_angle ANGLE += 5.0 if ANGLE > 360.0 then ANGLE = 0.0 end 0177: set_object SPAWNED_OBJECT z_angle_to ANGLE 0400: create_coordinate X_POS Y_POS Z_POS from_object SPAWNED_OBJECT offset 3.0 0.0 0.0 0215: destroy_pickup SPAWNED_PICKUP 0213: SPAWNED_PICKUP = create_pickup #ADRENALINE type 3 at X_POS Y_POS Z_POS end end
get, store, object, position, coordinates, location, offset