Jump to content

Event OnHit problem: Can not get projectile


Masterofnet

Recommended Posts

I have been doing more testing with the event on hit.

 

Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, \ bool abBashAttack, bool abHitBlocked)

 

I can not get this event to register any projectile as a projectile. Hit the actor with a magic projectile from a staff it returns no projectile.

 

In the Wiki it clearly states the event will only register none on akprojectile if the actor is hit with a melee weapon.

 

http://www.creationk...ObjectReference

 

Is there any projectile that this event will not return as None????

 

There has to be more to this. How could the Wiki state this event will work and it returns None on any projectile???

 

Is this script wrong??

 

If Akprojectile == SomeProjectile

Debug.Notification("This is a pain in the ***")

EndIf

 

This is what is returned on any projectile that I have tested.

 

If !Akprojectile

Debug.Notification("This is a pain in the *****")

Endif

 

Regards

Masterofnet

Edited by Masterofnet
Link to comment
Share on other sites

Projectiles shot from bows, spells or crossbows do not trigger onhit events, try experimenting with perk entry points:

 

- Combat hit spell.

- Weapon swing.

Combat hit or weapon swing will not register archery.

 

http://www.creationkit.com/Perk_Entry_Point

 

Bow shots do trigger the event on hit but the event will not register the projectile as I stated above.

 

Is there truly no way to get the arrow or arrow projectile that has struck an opponent??

 

Regards

Masterofnet

Edited by Masterofnet
Link to comment
Share on other sites

Find a way to enable 100% arrow retrieval if you hit an enemy, then use OnContainerChanged event as an onhit proxy, see if it works that way.

 

If oncontainerchanged does not work, make a cloak spell that adds the onitemadded event to nearby npcs and make it check for projectiles, if they add a projectile and 100% arrow retrieval is enabled then that means they got hit by an arrow.

 

Problem is IDK what happens if they get hit by an arrow other than yours :)

Edited by Kerberus14
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...