Jump to content

Papyrus Help


hidconsp

Recommended Posts

Hi, I have just began scripting with papyrus,

 

but I found it very hard.

 

What I want to do is give a magic effect that keeps the player's magicka over 10 any time.

 

So basically it is like infinite 10 magicka.

 

But what is the condition that the script can notice change in magicka?

 

I tried Event OnTrackedValue, Event OnUpdate, ...

 

but nothing seems to work satisfactorily.

 

 

 

This is what I was doing

 

Event OnTrackedStatsEvent(string asStat, int aiStatValue)

if (asStat == "Magicka")

if (asStat < 10)

Game.GetPlayer().modAV("Magicka", 10)

endIf

endIf

endEvent

Link to comment
Share on other sites

Tracked stats dont have anything to do with magic, heres the list of tracked stats http://www.creationkit.com/ListOfTrackedStats

 

Take a look at actor values or AV

http://www.creationkit.com/Actorvalue

 

I dont think theres an event for an AV change but you might be able to use the OnKeyDown or OnKeyUp event to listen for the attack/cast mouse button. Then check the AV in these events. I would attach the script to the player through an alias. Dont forget you have to register for the key you want a script to listen for.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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