Jump to content

Need help with script cast on self/target


SolitudeAeturnus

Recommended Posts

Spell dispels straight after casting.

 

Game location : Desktop

Dlcs : All, Game version Newest

Skse: Latest

Helper Programs : Boss

 

the problem i am having is the spells i made dispel instantly after i have casted them

 

( Here i will show you the layout of the spells )

i added a condition on the spell on fakearmorforai: HasKeyword <actortypeanimal> = 1.00 to stop it actually working which is a method i've tested and used on many spells with no issue.

 

type :ArmorSpell

 

What it does Type Magnitude Duration

spell Effects: FakeArmorforai Damageresist, self 50.7 1 Hour

EmptyEffect for scripts Script, self 0 0

 

Magic Effects for emptyEffectscript: Flags: No duration, No Area, No Magnitude

Keywords: MagicArmorSpell

 

 

Script used to point the spell above to the spell below: script created so i can slowly drain magicka

and dispel it if magicka isn't high enough

(it points to a spell with the real armor spell + magicka drain)

;======================================================================================;
; PROPERTIES /
;=============/
Spell property AddSpell auto
{The new Spell we will cast.}
;======================================================================================;
; EVENTS /
;=============/
Event OnEffectStart(Actor ckTarget, Actor ckCaster)
if (GetCasterActor().GetActorValue("Magicka") <= 9.0)
GetCasterActor().dispelSpell(Addspell)
Else
Addspell.cast(getcasteractor())
Endif
Endevent
Event OnEffectFinish(Actor ckTarget, Actor ckCaster)
if (GetCasterActor().GetActorValue("Magicka") <= 9.0)
GetCasterActor().dispelSpell(Addspell)
else
endif
EndEvent
----------------------------------------------------------------------------------------------------------------------------
Heres the script when it worked
;======================================================================================;
; PROPERTIES /
;=============/
Spell property AddSpell auto
{The new Spell we will cast.}
;======================================================================================;
; EVENTS /
;=============/
Event OnEffectStart(Actor ckTarget, Actor ckCaster)
Addspell.cast(getcasteractor())
Endevent
----------------------------------------------------------------------------------------------------------------------------

type :ArmorSpell + Magicka drain (The one the script Activates)

 

What it does Type Magnitude Duration

spell Effects: RealArmorSpell Damageresist 467 1 Hour

MagickaDrain Magicka 8 1 Hour

 

The magic Effect for the realarmorspell is the same as the vanilla ones (Ebony flesh, stone flesh, etc..)

and the drain one works perfectly, so i think the issue is infact the script.

 

 

 

if you require any more information please tell me, although i don't think load order, pc specs or anything else matters as it's an issue with the very script i created.

 

Link to comment
Share on other sites

Its been over 2 years since I've written a script for a mod,

 

But I think the easy way to write a script if I remember right was to look around at what has already been done.

 

I made a teleport script for a mod simply by looking up an event that happened in game, and then I changed the locations and activation as well as ref names.

 

Sorry its not what you wanted to hear.

 

If I was going to write spells though I'd crack open some spell mods and take a close look at the written scripts there too to see if that speed this up.

 

Spell mods similar to what your doing.

 

Bound Armor

 

others

Apocolypse Spell Package

Forgotten Magic

 

Good Luck man!

Link to comment
Share on other sites

Thankyou for posting =) i do really appreciate it. sadly i too use this method you mentioned of splicing and trying to comprehend scripts from the game/other mods and i haven't found one yet that does something similar (A spell that's duration is based on magicka rather than on vanilla system). and i myself created a bound armor spell for use by npcs (Mythic dawn) and used that scripts ideas into creating this one =(.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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