Torque3D Documentation / _generateds / ProximityMineData

ProximityMineData

consoledoc.h

Stores common properties for a ProximityMine.

More...

Arming

float

Delay (in seconds) from when the mine is placed to when it becomes active.

Sound to play when the mine is armed (starts at the same time as the armed sequence if defined).

Triggering

float

Delay (in seconds) from arming until the mine automatically triggers and explodes, even if no object has entered the trigger area.

bool

Controls whether the mine can be triggered by the object that owns it.

float

Distance at which an activated mine will detect other objects and explode.

float

Speed above which moving objects within the trigger radius will trigger the mine.

float

Delay (in seconds) from when the mine is triggered until it explodes.

Sound to play when the mine is triggered (starts at the same time as the triggered sequence if defined).

Explosion

float

Offset from the mine's origin where the explosion emanates from.Sometimes a thrown mine may be slightly sunk into the ground. This can be just enough to cause the explosion to occur under the ground, especially on flat ground, which can end up blocking the explosion. This offset along the mine's 'up' normal allows you to raise the explosion origin to a better height.

Callbacks

void

Callback invoked when an object triggers the ProximityMine.

void
onExplode(ProximityMine obj, Point3F pos)

Callback invoked when a ProximityMine is about to explode.

Detailed Description

Stores common properties for a ProximityMine.

Arming

float armingDelay 

Delay (in seconds) from when the mine is placed to when it becomes active.

SFXTrack armingSound 

Sound to play when the mine is armed (starts at the same time as the armed sequence if defined).

Triggering

float autoTriggerDelay 

Delay (in seconds) from arming until the mine automatically triggers and explodes, even if no object has entered the trigger area.

Set to 0 to disable.

bool triggerOnOwner 

Controls whether the mine can be triggered by the object that owns it.

For example, a player could deploy mines that are only dangerous to other players and not himself.

float triggerRadius 

Distance at which an activated mine will detect other objects and explode.

float triggerSpeed 

Speed above which moving objects within the trigger radius will trigger the mine.

float triggerDelay 

Delay (in seconds) from when the mine is triggered until it explodes.

SFXTrack triggerSound 

Sound to play when the mine is triggered (starts at the same time as the triggered sequence if defined).

Explosion

float explosionOffset 

Offset from the mine's origin where the explosion emanates from.Sometimes a thrown mine may be slightly sunk into the ground. This can be just enough to cause the explosion to occur under the ground, especially on flat ground, which can end up blocking the explosion. This offset along the mine's 'up' normal allows you to raise the explosion origin to a better height.

Callbacks

onTriggered(ProximityMine obj, SceneObject target)

Callback invoked when an object triggers the ProximityMine.

Parameters:

obj

The ProximityMine object

target

The object that triggered the mine

note:

This callback is only invoked on the server.

onExplode(ProximityMine obj, Point3F pos)

Callback invoked when a ProximityMine is about to explode.

Parameters:

obj

The ProximityMine object

pos

The position of the mine explosion

note:

This callback is only invoked on the server.