Jump to content

Please, How don't let cast the same spell until the effect is expired?


Tiranno71

Recommended Posts

Hi,

 

I've created some scripted spells and I need to don't let the caster recast the same spell until the effect is expired (like recall a horse to ride for 10 minutes). I know that need to do something with variables but i don't know how do it.

 

Any advice?

 

Thanks! :)

Link to comment
Share on other sites

Add a "scripted effect" to your spell. Give the effect a script that changes the value of a global variable. Something like

 

 

Scriptname SomeScript Extends ActiveMagicEffect

GlobalVariable Property SomeVar Auto

Event OnEffectStart(Actor akTarget, Actor akCaster)
	SomeVar.SetValueInt(1) ;effect is active
EndEvent

Event OnEffectFinish(Actor akTarget, Actor akCaster)
	SomeVar.SetValueInt(0) ;effect is inactive
EndEvent 

Conditions on the spell itself would require that the global variable be of the correct value before casting is allowed.

Link to comment
Share on other sites

Add a "scripted effect" to your spell. Give the effect a script that changes the value of a global variable. Something like

 

 

Scriptname SomeScript Extends ActiveMagicEffect

GlobalVariable Property SomeVar Auto

Event OnEffectStart(Actor akTarget, Actor akCaster)
	SomeVar.SetValueInt(1) ;effect is active
EndEvent

Event OnEffectFinish(Actor akTarget, Actor akCaster)
	SomeVar.SetValueInt(0) ;effect is inactive
EndEvent 

Conditions on the spell itself would require that the global variable be of the correct value before casting is allowed.

 

 

Thanks your advice and working around for a while i've made it! :) I've applied to other scripted spells too ^_^ . Now there are other steps for this spell ... How can force target to mount the horse without dismount until the effect expires? (For example a follower of mine) ... and how can make possible that horse follow directly the target without recruit as follower?

 

Can you give any other advice? :) Thanks anyway for ypur patience! ^_^

Link to comment
Share on other sites

  • Recently Browsing   0 members

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