Jump to content

Script to Add a Shout on equip?


Campaigner

Recommended Posts

Hello Nexus, once again I have a script question. Here's a script I've been using for my transformation rings mod;

 

Spell Property mySpell auto

Event OnEquipped(Actor akActor)
if akActor == Game.GetPlayer()
Game.GetPlayer().AddSpell(mySpell)
endif
endEvent

Event OnUnequipped(Actor akActor)
if akActor == Game.GetPlayer()
Game.GetPlayer().RemoveSpell(mySpell)
endIf
endEvent

 

Now, I want to add a shout that's ingame to this script, but the properties won't let me select the shout. How can I change this to work for a shout?

Edited by Campaigner
Link to comment
Share on other sites

I think shouts are their own script object so define the property as a shout.

 

http://www.creationkit.com/Shout_Script

Shout Property myShout auto

 

And use the actor functions to add/remove them

http://www.creationkit.com/AddShout_-_Actor

 

Thank you, changing the MySpell parts to shout and the header to what you suggested did the trick!

 

 

For future googlers who have the same problem, here's the working script:

 

Shout Property myShout auto

Event OnEquipped(Actor akActor)
if akActor == Game.GetPlayer()
Game.GetPlayer().AddShout(myShout)
endif
endEvent

Event OnUnequipped(Actor akActor)
if akActor == Game.GetPlayer()
Game.GetPlayer().RemoveShout(myShout)
endIf
endEvent

Link to comment
Share on other sites

Ah, it requires dragon souls to unlock the shout, even if it's learned through the script. Is there a way to make it not require souls?

 

EDIT: Scratch that, the shout I'm trying to add can't even be given dragon souls. Has no words to learn, despite me setting them in the kit. Oh well, no Afflicted vomit for me. Still good to have a working script for future fun though.

Edited by Campaigner
Link to comment
Share on other sites

  • Recently Browsing   0 members

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