PastChristmas Posted November 11, 2019 Share Posted November 11, 2019 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 More sharing options...
FrankFamily Posted November 11, 2019 Share Posted November 11, 2019 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_-_EffectShaderhttps://www.creationkit.com/index.php?title=Stop_-_EffectShaderhttps://www.creationkit.com/index.php?title=DamageActorValue_-_Actorhttps://www.creationkit.com/index.php?title=RegisterForSingleUpdate_-_Formhttps://www.creationkit.com/index.php?title=OnUpdate_-_Form Link to comment Share on other sites More sharing options...
maxarturo Posted November 11, 2019 Share Posted November 11, 2019 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 More sharing options...
PastChristmas Posted November 12, 2019 Author Share Posted November 12, 2019 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 More sharing options...
Recommended Posts