GetHit3DData
From GECK
A function added by the JIP NVSE Plugin.
Contents
Description
When called from a OnHit/OnHitWith script block (or the corresponding NVSE event handlers), or from a ScriptEffectStart block in an Ammo form Impact Script, will return an array_var containing the exact world X/Y/Z coords and/or angles where the target was hit.
The second argument dataType determines which values are returned in the array:
0 X/Y/Z coords (elements 0-2) 1 X/Y/Z angles (elements 0-2) 2 X/Y/Z coords (elements 0-2) AND angles (elements 3-5)
Syntax
(hit3DData:array_var) reference.GetHit3DData dataType:int{0-2}
Example
let aHit3DData := targetRef.GetHit3DData 0 let fHitPosX := aHit3DData[0] let fHitPosY := aHit3DData[1] let fHitPosZ := aHit3DData[2]
let aHit3DData := targetRef.GetHit3DData 2 let fHitPosX := aHit3DData[0] let fHitPosY := aHit3DData[1] let fHitPosZ := aHit3DData[2] let fHitAngX := aHit3DData[3] let fHitAngY := aHit3DData[4] let fHitAngZ := aHit3DData[5]
Notes
- For all hits that originated from an Explosion, all array elements will be 0.