Jump to content

Scripting help


monkeyboi

Recommended Posts

First off I'm not exactly sure if this is in the right spot, if it's not i apologize.

 

Okay, I recently had an idea for a different way to use certain spells. (tell me if it has been done before)

 

The idea is that certain spells (lets say shield for example) would have very modest initial Magicka cost to cast, but based on the magnitude of the effect as long as the spell is on it drains a certain amount of Magicka per second. until the players Magicka hits zero or until player deactivates the spell (possibly by casting it again)

 

i could implement this myself but i have no idea where to start when it comes to scripting, so if anyone wants to use this idea, or point me in the right direction i would be very grateful.

Link to comment
Share on other sites

as far as i know, it is possible, but i'm not 100% sure about that

you see, i'm not really sure how to make it last until you run out of magicka

however, what you can do is make it last a really long time (something that doesn't make sense, like 9999 seconds) and add an optional script (as in If function) to check if you run out of magicka, and then it de-activates the spell

i'll try looking into that, and see if i can send you the functions that you'll need

Link to comment
Share on other sites

i searched a bit, but i found a problem

see, what you need is a check that when the magicka hits 0, the spell shuts off, but i can't find a script that checks your current magicka

it might be a really simple one that i don't know, or there isn't any

 

basically, my idea was a spell that adds the shield effect, but also a damage magicka effect, and even stunted magicka if you want

and you can mod the cast value to be small, and that would do what you want, but it's not going to end when you run out of magicka, hence you need the script

Link to comment
Share on other sites

so if i understand correctly...

it's possible if i did a sort of (keep in mind i don't know any commands or syntax, this is just how i believe it may flow)

 

on cast: shield(magnitude)

drain magicka X/per second

if magica=0 remove shield

<or>

on cast: remove shield

end.

 

 

that's what i think may work. i just don't know what commands i would use to do that.

if someone could even point me to a sort of "tutorial" for this language i would be very appreciative.

 

also i know that the toggle itself will work as i have a toggle able night eye for my kajit character.

i just need to add the drain and cutoff really...

Edited by monkeyboi
Link to comment
Share on other sites

well, it's not gonna be just like this, but in general, it's the idea

but as far as i know, there is no check for if your magicka hits 0 or not

so i don't know how to do this

 

now, if you want a tutorial, i can tell you which site helped me get started

it's this site

just open the script section of the site, and start reading :)

look in the functions, if you can find a check for your current magicka

Link to comment
Share on other sites

so i got what i think the basic toggle portion is sorted out...

 

Scriptname KTKhajiitNightEyeScript

 

Begin ScriptEffectStart

 

If ( player.IsSpellTarget KTKhajiitNightEye == 0 )

player.addSpell KTKhajiitNightEye

else

player.removeSpell KTKhajiitNightEye

endif

 

End

 

this was from another mod that i use (and love)

 

would i be correct in assuming that all i need to do then is change the spell names and it would toggle something different?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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