Mod:Creation Kit/OnTrapHitStart - ObjectReference

Member of: Mod:Creation Kit/ObjectReference Script

Event called when the object reference is a trap and has started hitting a live target.

Syntax
Event OnTrapHitStart(ObjectReference akTarget, float afXVel, float afYVel, float afZVel, float afXPos, float afYPos, \   float afZPos, int aeMaterial, bool abInitialHit, int aeMotionType)

Parameters

 * akTarget: The ObjectReference that this reference just hit.
 * afXVel: The X velocity for our reference when it hit.
 * afYVel: The Y velocity for our reference when it hit.
 * afZVel: The Z velocity for our reference when it hit.
 * afXPos: The X position of our reference when it hit.
 * afYPos: The Y position of our reference when it hit.
 * afZPos: The Z position of our reference when it hit.
 * aeMaterial: 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.
 * abInitialHit: True if this is the first time the trap has hit the target.
 * aeMotionType: 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) endEvent