Jump to content

Spells to apply a perk, toggle, and dispel each other.


Darg727

Recommended Posts

I am trying to make a set of spells (I want to make them lesser powers) that give different perks, can toggle on and off, and overwrite the previous spell. I am debating adding a magicka upkeep cost.

 

I know little of scripting which I am assuming is needed for 3/4 of the spell. I don't know where to start or even if it would work. I would be grateful for any assistance.

 

Edit: So far I have the script:

 

Scriptname toggletest4 extends activemagiceffect
Perk Property NewProperty Auto
Event OnEffectStart ()
If Game.getPlayer().hasPerk(NewProperty) == false
Game.getPlayer().addPerk(NewProperty, false)
Else
Game.getPlayer().removePerk(NewProperty)
EndIf
EndEvent
It failed:
Compiling "toggletest4"...
C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\toggletest4.psc(7,19): too many arguments passed to function
C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\toggletest4.psc(5,0): the parameter types of function oneffectstart in the empty state on script toggletest4 do not match the parent script activemagiceffect
No output generated for toggletest4, compilation failed.
Edited by Darg727
Link to comment
Share on other sites

  • 4 weeks later...

Here is one that I made, I don't know if it functions in game, but it compiles without any error messages. Don't forget to create the actual perks first though.

 

Scriptname (Blank) extends activatemagiceffect

 

Perk Property (Blank) Auto

 

Event OnEffectStart (Actor akTarget, Actor akCaster)

 

If akTarget.HasPerk(Blank) == false

akTarget.AddPerk(Blank)

Else

akTarget.RemovePerk(Blank)

Endif

EndEvent

Link to comment
Share on other sites

  • Recently Browsing   0 members

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