- Found in:
- Dylbills PE
Description
Documentation Comment
impactResults are: 0 = none, 1 = destroy, 2 = bounce, 3 = impale, 4 = stick
for collided layer see DbSkseFunctions.GetCollisionLayerName()
projectileMarker is an xMarker that is placed at the projectile at the point of impact so you can use functions
GetPosition, GetAngle and GetHeadingAngle to compare with the target
damagedNodeName only works on actors. e.g "SHIELD", "NPC Head [Head]", "NPC R UpperArm [RUar]" ect.
projectileHitTranslation is only valid for actors. projectileHitTranslation.length will be 6 if the data is valid.
[0] = Xposition, [1] = Yposition, [2] = Zposition,
[3] = XhitDirection, [4] = YhitDirection, [5] = ZhitDirection
this event requires the iMaxArrowsSavedPerReference setting in DbSkseFunctions.ini to be greater than 0.
Parameters
ObjectReferenceshooter
ObjectReferencetarget
FormSource
AmmoammoSource
ProjectileakProjectile
boolabSneakAttack
boolabHitBlocked
intimpactResult
intcollidedLayer
floatdistanceTraveled
stringdamagedNodeName
ObjectReferenceprojectileMarker
float[]projectileHitTranslation
Examples
Auto-Generated Example
Scriptname MyCoolScript extends DbSkseEvents
event OnProjectileImpactGlobal(ObjectReference shooter, ObjectReference target, Form Source, Ammo ammoSource, Projectile akProjectile, bool abSneakAttack, bool abHitBlocked, int impactResult, int collidedLayer, float distanceTraveled, string damagedNodeName, ObjectReference projectileMarker, float[] projectileHitTranslation)
Debug.trace("Event received - OnProjectileImpactGlobal: shooter = " + shooter + " target = " + target + " Source = " + Source + " ammoSource = " + ammoSource + " akProjectile = " + akProjectile + " abSneakAttack = " + abSneakAttack + " abHitBlocked = " + abHitBlocked + " impactResult = " + impactResult + " collidedLayer = " + collidedLayer + " distanceTraveled = " + distanceTraveled + " damagedNodeName = " + damagedNodeName + " projectileMarker = " + projectileMarker + " projectileHitTranslation = " + projectileHitTranslation)
endEvent