Jump to content

requesting script help: making the SilverSword script work on magic ef


Rorax

Recommended Posts

I am currently trying to make the silversword perk function on a magic effect. Normally the perks script is applied directly to the weapon. But in this case it needs to be applied to a magic effect as that is the only place it can go in regards to ammo.

 

I'm trying to make silver bolts and arrows for clarification. I'm completely new to the CK especially scripts so I am stumped at this point and could really use some help.

 

http://forums.nexusmods.com/index.php?/topic/761238-arrows-with-enchantments-done-through-effect-explosion/

 

This is a thread I posted earlier but it turns out that wasn't the issue. but should give context to the problem

 

I hope this all made sense. Thanks!

Link to comment
Share on other sites

I haven't tested this script.

 

Scriptname SilverSwordMagicEffect extends ActiveMagicEffect

Perk Property SilverPerk auto

Event OnEffectStart(Actor akTarget, Actor akCaster)
If akCaster == Game.GetPlayer()
	akCaster.AddPerk(SilverPerk)
EndIf
EndEvent

Event OnEffectFinish(Actor akTarget, Actor akCaster)
If akCaster == Game.GetPlayer()
	akCaster.RemovePerk(SilverPerk)
EndIf
EndEvent

Link to comment
Share on other sites

I haven't tested this script.

 

Scriptname SilverSwordMagicEffect extends ActiveMagicEffect

Perk Property SilverPerk auto

Event OnEffectStart(Actor akTarget, Actor akCaster)
If akCaster == Game.GetPlayer()
	akCaster.AddPerk(SilverPerk)
EndIf
EndEvent

Event OnEffectFinish(Actor akTarget, Actor akCaster)
If akCaster == Game.GetPlayer()
	akCaster.RemovePerk(SilverPerk)
EndIf
EndEvent

 

 

Unfortunately that didn't work. I think it's probably because by the time the effect has started it's already "done the damage" and so applying the perk then doesn't add the extra 20 it is supposed to.

This is so confusing. I'm not quite sure why it won't just do the 20 damage that the enchantment dictates, I mean the magic effect that the enchantment uses already uses a conditional to pick what actually takes the damage. which in it's case is undead ghosts and people from the werewolf faction. So I'm not entirely sure why it needs a script. or why the damage isn't being applied in the first place.

Link to comment
Share on other sites

OK, so you just want to do 20 damage when the effect is applied? We don't even need to use the perk at all:

 

Scriptname SilverSwordMagicEffect extends ActiveMagicEffect 

Event OnEffectStart(Actor akTarget, Actor akCaster) 
               akTarget.DamageAV("health", 20.0)
EndEvent

 

Edit: are you sure that the Draugr aren't immune to that type of spell?

 

Edit2: did you try setting the damage of the explosion effect to 20? Also the area of the explosion would need to be about 70. Just to put things in context, the height of a birds nest is about 30 units, so an explosion of radius 1 is about the size of a grain of sand and the actor might not detect it.

Edited by steve40
Link to comment
Share on other sites

OK, so you just want to do 20 damage when the effect is applied? We don't even need the to use the perk at all:

 

Scriptname SilverSwordMagicEffect extends ActiveMagicEffect 

Event OnEffectStart(Actor akTarget, Actor akCaster) 
               akTarget.DamageAV("health", 20.0)
EndEvent

 

Edit: are you sure that the Draugr aren't immune to that type of spell?

 

Edit2: did you try setting the damage of the explosion effect to 20? Also the area of the explosion would need to be about 70. Just to put things in context, the height of a birds nest is about 30 units, so an explosion of radius 1 is about the size of a grain of sand and the actor might not detect it.

 

Thanks steve! I havn't tested this yet as I'm on a different computer, But thanks so much for your assistance :D

Unfortunately I can't just make the explosion do 20 or it would add the extra damage to living targets aswell. And draugr do count as undead as turn undead spells work on them.

And thanks so much for the unit size context. The exploding bolt that I was using for reference was 150 which in my head I was thinking was pretty big.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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