morrowind1979 Posted February 11, 2019 Share Posted February 11, 2019 Hi all. I am updating my Nightspawn race and am making all light spells damage the race when cast. I have successfully done them all except the magelight scroll. I just cant get any scripts to work. This is what I have attached to the magic effect (u cant attach scripts to spells or scrolls, only magic effects): Scriptname NSMagelightDamScript extends activemagiceffect EFFECTSHADER PROPERTY effect AUTO KEYWORD PROPERTY NSKW AUTO Event OnEffectFinish(Actor akTarget, Actor akCaster) If akCaster.haskeyword (NSKW) effect.play(akCaster) akCaster.damageAV("health",200) effect.stop(akCaster) EndIf EndEvent When the player casts the spell nothing happens and his/her health is not damaged. Can anyone help me with this please? Link to comment Share on other sites More sharing options...
morrowind1979 Posted February 11, 2019 Author Share Posted February 11, 2019 (edited) Hi all. I am updating my Nightspawn race and am making all light spells damage the race when cast. I have successfully done them all except the magelight scroll. I just cant get any scripts to work. This is what I have attached to the magic effect (u cant attach scripts to spells or scrolls, only magic effects): Scriptname NSMagelightDamScript extends activemagiceffect EFFECTSHADER PROPERTY effect AUTO KEYWORD PROPERTY NSKW AUTO Event OnEffectFinish(Actor akTarget, Actor akCaster) If akCaster.haskeyword (NSKW) effect.play(akCaster) akCaster.damageAV("health",200) effect.stop(akCaster) EndIf EndEvent When the player casts the spell nothing happens and his/her health is not damaged. Can anyone help me with this please?I've just discovered that with aimed magic effects that use projectiles The EventOnEffectStart script only begins once the projectile hits its target. SO what I need to do is make some sort of script that activates when the spell is cast rather than when the projectile hits its target. If anyone could advise me on how to do this, would be great. Edited February 11, 2019 by morrowind1979 Link to comment Share on other sites More sharing options...
SeraphimKensai Posted February 13, 2019 Share Posted February 13, 2019 Can you use OnSpellCast? It extends an Object Ref so you may have to reference the caster as an object to get it to work if it doesn't work natively. https://www.creationkit.com/index.php?title=OnSpellCast_-_ObjectReference Link to comment Share on other sites More sharing options...
morrowind1979 Posted February 13, 2019 Author Share Posted February 13, 2019 No you cant use OnSpellCast with a scroll it only works for spells. Already tried, thanks for the help though. Link to comment Share on other sites More sharing options...
SeraphimKensai Posted February 13, 2019 Share Posted February 13, 2019 Hmmm that's weird as logically it would make sense to use the same function for both spells and scrolls. Might be a long shot and I can't test since I'm at work but what about OnActivate? I'm not sure if it would work but in a sense you're activating a scroll to use it. Link to comment Share on other sites More sharing options...
morrowind1979 Posted February 13, 2019 Author Share Posted February 13, 2019 The script will compile fine if you use a scroll property instead of a spell property but the script will not work unless its a spell property. Not sure how I would set up a script event using OnActivate to fire when the scroll is cast. Ill google OnActivate. Link to comment Share on other sites More sharing options...
Recommended Posts