Jump to content

Check if player got hit by NPC or Creature in quest script?


hexef

Recommended Posts

I am trying to make a mod where if you get shot or meleed by an NPC or hit by a creature you have a chance to get a wound infection. The only solution that comes on top of my head is by creating an object script for Player Actor and using the OnHit function, which is not compatibility friendly I suppose, as I've seen other mods that have a custom script for Player Actor. I wonder if there is another way around to track this, for example, in a quest script.

 

Any suggestions ?

Link to comment
Share on other sites

Use NVSE event handling to respond to OnHit events on the player. This is a conflict-free way of achieving the same as with an object script.

 

Read more here and follow the link to the off-site tutorial at the bottom of page for a thorough explanation on how to use them.

 

One thing to note, if I'm remembering right, is that the OnHit event fires before any damage is calculated. Don't quote me on it though.

Link to comment
Share on other sites

Use NVSE event handling to respond to OnHit events on the player. This is a conflict-free way of achieving the same as with an object script.

 

Read more here and follow the link to the off-site tutorial at the bottom of page for a thorough explanation on how to use them.

 

One thing to note, if I'm remembering right, is that the OnHit event fires before any damage is calculated. Don't quote me on it though.

 

Thank you for the link, I am currently reading the tutorial from loverslab. Looks like those event handle functions are a godsend for those who want to make mods as compatible as possible.

Edited by xqdcss
Link to comment
Share on other sites

  • Recently Browsing   0 members

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