Jump to content

Damage over time attached to an Constant Effect Ability


Recommended Posts

I want to simulate the effect of a weapon so hot that it damages whoever equips it. So far, I've scripted an ability to the weapon, so those who equip it also gain the ability. This ability is conditioned to activate when "isweaponout" = 2, and I can confirm by the visuals that so far it's all working, except for the damage effect that I've set the ability to inflict when the conditions are met. Is there something I could be forgetting?

Link to comment
Share on other sites

There might be a better method but you could just script the damage, I had to do a similar thing once and it's what I did. Start a loop when it's equipped and on each update damage the player by certain amount and maybe play some visual effect like burning or whatever, just make sure to stop the effect when the damage ends.

 

Relevant documentation:

https://www.creationkit.com/index.php?title=Play_-_EffectShader

https://www.creationkit.com/index.php?title=Stop_-_EffectShader

https://www.creationkit.com/index.php?title=DamageActorValue_-_Actor

https://www.creationkit.com/index.php?title=RegisterForSingleUpdate_-_Form

https://www.creationkit.com/index.php?title=OnUpdate_-_Form

Link to comment
Share on other sites

You can do "Damage over time" by using the simple scripting style of the default vanilla "DB10FireTrigger" script, you'll need to modify it and add it to you "OnEquiped" script.

DB10FireTrigger

 

 

scriptName DB10FireTrigger extends objectReference
{This script is for the burning sequence of the dark brotherhood}
 
 
keyword property DB10MagicHeavyFire auto
explosion property DB10TrapFireTriggerExplosion01 auto
 
event onTrigger(objectReference triggerRef)
      if triggerRef as actor && !(triggerRef as actor).isDead()
 
        ;If the actor does not already have this fire effect on them
      if !(triggerRef as actor).HasMagicEffectWithKeyword(DB10MagicHeavyFire)
        ;  debug.Trace(self + " has applied gas to " + triggerRef)
         triggerRef.placeAtMe(DB10TrapFireTriggerExplosion01)
endif
endif
endEvent

Link to comment
Share on other sites

I'm embarassed to admit that I found out the reason why the visuals were playing, but the damage wasn't occurring. When I test my NPC's abilities I instinctively enable tgm in console commands and I forgot to disable it to test my weapon. All characters will now burn with my weapon equipped.

 

Thank you for the insight! I was wondering how to achieve the same effect via scripting, as a few spells I have been experimenting with for my NPCs have debuffs associated with them, so they are reluctant to cast those if they have detected the "detrimental" magical effects in the Creation Kit.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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