Jump to content

OnHit Event that checks for spell


antstubell

Recommended Posts

This is what I did when allowing ore veins to recognize spells and spell projectiles in order to give experience to the user selected magic skill line.

Added this and did my stuff inside that block.

If mineOreToolsList.hasForm(akProjectile as Form) || (mineOreToolsList.hasForm(akSource) && akSource as Spell)

If your OnHit event doesn't already use a formlist, create one and add the appropriate spells and projectiles to that list. For mod compatibility, either you or the other author(s) could add new spells / projectiles to the formlist via script.

 

That said, there is the stock script TrapOilPool which can be used. It already contains a couple formlists with spells, light sources and other things to trigger the pool when hitting or entering the area. The script extends TrapExplosiveGas which contains most of the work in case you were wondering. If desired, you can always use your own custom lists with TrapOilPool for your object instead of the ones that Bethesda put together.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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