Jump to content

Make an aimed magic effect damage player on cast


morrowind1979

Recommended Posts

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

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 by morrowind1979
Link to comment
Share on other sites

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

  • Recently Browsing   0 members

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