Jump to content

Recommended Posts

Posted

I'm attempting a script using OnHit on an oil pool trap. Maybe I should use a OnMagicEffectApply - I don't know. Basically I want stuff to happen when object is hit by a spell but only a fire spell. Not sure where to start.

Thanks.

Posted

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.

  • Recently Browsing   0 members

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