Jump to content

Cancel Spell Cast script


Recommended Posts

Okay, so I am trying to make a spell, that if you do not have the required items to cast it, it will not allow it and display a message saying why. I have all the latter down, minus it canceling the cast itself. Here's my script. I tried to make a 'workaround' to cancel it by deleting then readding the spell, which itself works, but still doesn't cancel the cast. Forgive if it's incredibly simple and a mere oversight on my end. I have OBSE so you can list which function it is, if it is, here. I have searched through the standard and OBSE functions to no avail though.

 

 

scn bmtestspellscript
Short Message
Begin ScriptEffectStart

if player.getitemcount gold001 <1
message "You have no runes"
removespell bmtestspell
endif
End
Begin ScriptEffectFinish

addspell bmtestspell
End

 

Link to comment
Share on other sites

I just had a thought. I think that since I can't figure out how to cancel a cast, I'm going to instead make it cost money, health, or something of the like if you don't have the required items. It's at least a workaround for now.

Link to comment
Share on other sites

to cancel a spell,

you could use event handler OnSpellCast (read here --> https://cs.elderscrolls.com/index.php?title=Event_Handler_Functions)

and then

force the actor to play idle

 

to simplify the functions you could just use that script of yours (ScriptEffectStart)

and force the actor to play idle with this simple script

PlayGroup Idle 1

use syntax 'return' to prevent the script running

or

you could use syntax Dispel <your_spell>

Edited by lubronbrons
Link to comment
Share on other sites

  • Recently Browsing   0 members

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