ProximityMineData

.

Inherit:
ItemData

Description

Stores common properties for a ProximityMine.

Methods

void ProximityMineData::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
void ProximityMineData::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

Fields

float ProximityMineData::armingDelay

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

SFXTrack ProximityMineData::armingSound

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

float ProximityMineData::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.

float ProximityMineData::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.

float ProximityMineData::triggerDelay

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

bool ProximityMineData::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 ProximityMineData::triggerRadius

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

SFXTrack ProximityMineData::triggerSound

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

float ProximityMineData::triggerSpeed

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