Skip to content

niGravity⚓︎

This modifer applies force, constant over time, to particles in the parent niParticleSystemController.

This type inherits the following: niParticleModifier, niObject

Properties⚓︎

controller⚓︎

Access to the generic time controller for particle systems.

Returns:


decay⚓︎

This value impacts how fast gravitational force attenuates with the distance from the source. A value of 0 causes no decay.

Returns:

  • result (number)

direction⚓︎

The direction of action for planar gravity.

Returns:


force⚓︎

The magnitude of the gravitational force in units/second.

Returns:

  • result (number)

forceType⚓︎

The type of the modifier. Planar force will attract the particles parallel to the .direction vector. Spherical force will act so that the point defined by .position property is the source of the spherical gravitational force.

Maps to values in ni.gravityForceType table.

Returns:


next⚓︎

Access to the next attached modifier.

Returns:


position⚓︎

The position of the center used when applying spherical gravity.

Returns:


refCount⚓︎

Read-only. The number of references that exist for this object. When this value reaches zero, the object will be deleted.

Returns:

  • result (number)

RTTI⚓︎

Read-only. The runtime type information for this object. This is an alias for the .runTimeTypeInformation property.

Returns:


runTimeTypeInformation⚓︎

Read-only. The runtime type information for this object.

Returns:


Methods⚓︎

clone⚓︎

Creates a copy of this object.

local result = myObject:clone()

Returns:


isInstanceOfType⚓︎

Determines if the object is of a given type, or of a type derived from the given type.

local result = myObject:isInstanceOfType(type)

Parameters:

Returns:

  • result (boolean)

isOfType⚓︎

Determines if the object is of a given type.

local result = myObject:isOfType(type)

Parameters:

Returns:

  • result (boolean)

saveBinary⚓︎

Serializes the object, and writes it to the given file.

local success = myObject:saveBinary(path)

Parameters:

  • path (string): The path to write the file at, relative to the Morrowind installation folder.

Returns:

  • success (boolean): If true the object was successfully serialized.