Jump to content

RegisterForHitEvent with a RefCollectionAlias


Recommended Posts

Greetings

 

As part of my Clipboard mod I'm using RegisterForHitEvent with a RefCollectionAlias of all workshop objects so I can detect what objects people shoot. But I've noticed that NPCs (Settler, Turrets, Animals, etc...) I include in the RefCollectionAlias do not fire OnHit event when they are shot. Is there a workaround to get OnHit events from them?

 

I've confirmed multiple times that they are in the RefCollectionAlias and they are picked up properly with all my other selection methods, so the issue seems purely around receiving OnHit events.

 

An alternate solution I've explored is using:

 

RegisterForAnimationEvent(PLAYER_REF, "weaponFire")

 

and F4SE to get the crosshair target reference but I haven't been able to find the native address of a ViewCasterUpdateEvent dispatcher.

 

Any ideas?

Thanks!

Edited by Struckur
Link to comment
Share on other sites

  • Recently Browsing   0 members

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