antstubell Posted May 10, 2021 Share Posted May 10, 2021 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. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted May 10, 2021 Share Posted May 10, 2021 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 More sharing options...
antstubell Posted May 11, 2021 Author Share Posted May 11, 2021 I see. Good stuff. I'll experiment. Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts