This is an old revision of the document!
Native module that provides bindings to objects in the game world.
consolePlayer ( )
Returns an object representing the console player (App.Player).
Base class for mobjs.
attack ( damage : Number, missileId : Number )
(Availability: 2.2, only in Heretic.)
Starts the attack action of an enemy by calling the native function
P_Attack(). If the current target of the enemy is in the melee range, damage points of damage will be dealt. Otherwise, a missile is spawned.
health ( )
Returns the remaining hit points of the thing (as a Number).
id ( )
Returns the ID number of the thing.
player ( )
If the mobj belongs to a player, returns an object representing that player (see App.Player). Otherwise returns
recoil ( force : Number )
Pushes the thing backwards by force units. For example, the Heretic Phoenix Rod uses a recoil of 4 units. The current direction of the thing determines which direction the recoil is applied.
startSound ( id : Text, volume : Number = 1.0 )
Starts playing a sound using the thing as the emitter. By default, the volume is at maximum (1.0). There must be a Sound definition with a matching id.