User Tools

Site Tools


script:module:world

World (Module)

Native module that provides bindings to objects in the game world.

Functions

consolePlayer ( )

Returns the number of the console player.

World.Thing

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.

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.

script/module/world.txt · Last modified: 2019-12-01 13:36 by skyjake