Jump to content

[LE] Self damage spells - HP instead of MP


Dimitian

Recommended Posts

I'm trying to make the first spell in a blood magic pack.

 

Spells cannot charge with anything but MP, so I'm doing it like the Equilibrium spell; damage player's health on cast.

 

Problem is, how would I do that for a fire and forget spell? How to make the spell fire, and then damage you for a set amount.

Link to comment
Share on other sites

Add a script to the magic effect with this in it:


Actor Property PlayerRef Auto

Event OnEffectStart(actor akcaster, actor aktarget)
PlayrRef.ModActorValue("Health", ***)
EndEvent

And just replace *** with however much health you want to take away. :happy:

Edited by xcafe
Link to comment
Share on other sites

Oh yeah, you're right, hmm...

Oh, I know!

 

Have the actual spell you're casting be a fire/forget on self, and then just fill out and attach this script to it!

Scriptname ExampleScript extends ActiveMagicEffect

Actor Property PlayerRef Auto
Spell Property SpellToCast Auto

Event OnEffectStart(actor akcaster, actor aktarget)
PlayerRef.DamageActorValue("Health", -***)
SpellToCast.Cast(PlayerRef)
EndEvent

This should probably work!

Link to comment
Share on other sites

Oh yeah, you're right, hmm...

Oh, I know!

 

Have the actual spell you're casting be a fire/forget on self, and then just fill out and attach this script to it!

Scriptname ExampleScript extends ActiveMagicEffect

Actor Property PlayerRef Auto
Spell Property SpellToCast Auto

Event OnEffectStart(actor akcaster, actor aktarget)
PlayerRef.DamageActorValue("Health", -***)
SpellToCast.Cast(PlayerRef)
EndEvent

This should probably work!

 

When you say 'fill out', do you mean just add some numbers to the PlayerRef.DamageActorValue("Health", -***) part?

Link to comment
Share on other sites

Well that and fill like the properties. When you attach the script to the spell, click on the script and hit the 'properties' button, and then select what spell you want this spell to cast (aka the fire/forget spell that you're actually trying to cast) and then hit autofill on the actor property.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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