Package openmw.worldΒΆ

openmw.world is an interface to the game world for global scripts.

Can not be used from local scripts.

Usage:

local world = require('openmw.world')

Type world

world.activeActors

List of currently active actors.

world.getCellByName(cellName)

Loads a named cell

world.getExteriorCell(gridX, gridY)

Loads an exterior cell by grid indices

world.isWorldPaused()

Whether the world is paused (onUpdate doesn't work when the world is paused).

world.selectObjects(query)

Evaluates a Query.

world.setGameTimeScale(ratio)

Set the ratio of game time speed to simulation time speed.

Type core

core.getGameTime()

Game time in seconds.

core.getGameTimeScale()

The scale of game time relative to simulation time.

core.getSimulationTime()

Simulation time in seconds.

core.getSimulationTimeScale()

The scale of simulation time relative to real time.

Type world

Field(s)

openmw.core#ObjectList world.activeActors

List of currently active actors.

world.getCellByName(cellName)

Loads a named cell

Parameter

  • #string cellName :

Return value

openmw.core#Cell:

world.getExteriorCell(gridX, gridY)

Loads an exterior cell by grid indices

Parameters

  • #number gridX :

  • #number gridY :

Return value

openmw.core#Cell:

world.isWorldPaused()

Whether the world is paused (onUpdate doesn't work when the world is paused).

Return value

#boolean:

world.selectObjects(query)

Evaluates a Query.

Parameter

Return value

openmw.core#ObjectList:

world.setGameTimeScale(ratio)

Set the ratio of game time speed to simulation time speed.

Parameter

  • #number ratio :

Type core

Field(s)

core.getGameTime()

Game time in seconds.

Return value

#number:

core.getGameTimeScale()

The scale of game time relative to simulation time.

Return value

#number:

core.getSimulationTime()

Simulation time in seconds.

The number of simulation seconds passed in the game world since starting a new game.

Return value

#number:

core.getSimulationTimeScale()

The scale of simulation time relative to real time.

Return value

#number: