- Found in:
- Vanilla
eventOnTrapHitStart(ObjectReferenceakTarget, floatafXVel, floatafYVel, floatafZVel, floatafXPos, floatafYPos, floatafZPos, intaeMaterial, boolabInitialHit, intaeMotionType)
Description
Wiki Description
Event called when the object reference is a trap and has started hitting a live target.
Documentation Comment
Event recieved when this starts hitting a target
Parameters
ObjectReferenceakTarget
CK Wiki Description
The ObjectReference that this reference just hit.
floatafXVel
CK Wiki Description
The X velocity for our reference when it hit.
floatafYVel
CK Wiki Description
The Y velocity for our reference when it hit.
floatafZVel
CK Wiki Description
The Z velocity for our reference when it hit.
floatafXPos
CK Wiki Description
The X position of our reference when it hit.
floatafYPos
CK Wiki Description
The Y position of our reference when it hit.
floatafZPos
CK Wiki Description
The Z position of our reference when it hit.
intaeMaterial
CK Wiki Description
Opaque integer value denoting what material the trap is. Not intended to be meaningful to script, just to be passed to other native functions that may use it.
boolabInitialHit
CK Wiki Description
True if this is the first time the trap has hit the target.
intaeMotionType
CK Wiki Description
The motion type for the trap.
- Note: Currently there are several read-only properties in the ObjectReference source file that match this, but it will later be changed to an enum and the possible list of values reduced to something more meaningful.
Examples
Event OnTrapHitStart(ObjectReference akTarget, float afXVel, float afYVel, float afZVel, float afXPos, float afYPos, \
float afZPos, int aeMaterial, bool abInitialHit, int aeMotionType)
Debug.Trace("Ouch! We just started hitting " + akTarget)
endEventAuto-Generated Example
Scriptname MyCoolScript extends ObjectReference
event OnTrapHitStart(ObjectReference akTarget, float afXVel, float afYVel, float afZVel, float afXPos, float afYPos, float afZPos, int aeMaterial, bool abInitialHit, int aeMotionType)
Debug.trace("Event received - OnTrapHitStart: akTarget = " + akTarget + " afXVel = " + afXVel + " afYVel = " + afYVel + " afZVel = " + afZVel + " afXPos = " + afXPos + " afYPos = " + afYPos + " afZPos = " + afZPos + " aeMaterial = " + aeMaterial + " abInitialHit = " + abInitialHit + " aeMotionType = " + aeMotionType)
endEvent