Jump to content

Script to cast spell on self


Natureboy7

Recommended Posts

Hi

I want to make a mod where animals cast a spell on themselves under a specific condition.

First I tried doing that without scripts via abilities with conditions. But I need the spells to have a duration. Apparently this is not possible with abilities, because they have no duration and are allway active.

So I figured the best way would be to have a script that casts the self-delivered spell when the condition is met.

Unfortunately I don't know much about scripting and I don't want to make a mod with a bad script that could ruin your save.

 

Could someone help me make a simple script that makes an animal cast a spell on itself when a condition is met (the condition is that the animal is fleeing)?

That would be really great!

Thank you.

Link to comment
Share on other sites

The trouble with scripts is that a save will include the scripts even if the mod is uninstalled. So while I use a lot of scripts, I probably use too many lol. What exactly are you trying to get the animal to do, that you want it to have a set duration?

 

As for scripting, if you have no familiarity whatsoever with it, I highly recommend doing the Papyrus tutorials on creationkit.com, or else whatever anyone says is going to be gibberish to you. I'd help further, but I'm rusty on my scripting, and I'm not at home to dig into my CK to refresh myself xD

Link to comment
Share on other sites

Thanks for the answer.

What I am trying to do is give animals the ability to sprint. When they flee they should run faster for a short time. I researched maximum running speeds of the different animals that exist in skyrim.

First I tried doing it via conditions. I had a spell which drained their stamina when fleeing and the sprint spell had a condition, that the animal needed minimum 1 stamina. So the animal would stop sprinting, when stamina was completely drained.

That was buggy however.

Than I tried giving the ability a duration, but I found out that abilities ar always on.

So I figured the best Idea would be a script.

Edited by Natureboy7
Link to comment
Share on other sites

  • Recently Browsing   0 members

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