Checking conditions and adding spells

Post » Mon Feb 18, 2013 5:40 pm

Silly me. I got quite good at scripting for Oblivion and thought I could jump right into Skyrim. Wrong! Anyway, I've been writing and rewriting the following Papyrus Fragment in a Quest trying to get it to work. It's a simple goal. The quest is set to activate on a Level Increase, and each time will check certain player conditions and add spells accordingly.

If (Game.GetPlayer().GetLevel <= 1) && Game.GetPlayer().IsSpellTarget (MyInitialSpell)   Game.GetPlayer().RemoveSpell (MyInitialSpell)   Game.GetPlayer().AddSpell (MySpell01)ElseIf (Game.GetPlayer().GetLevel == 2) && Game.GetPlayer().IsSpellTarget (MySpell01)   Game.GetPlayer().RemoveSpell (MySpell01)   Game.GetPlayer().AddSpell (MySpell02)EndifIf (Game.GetPlayer().GetBaseActorValue(HeavyArmor) >= 50)   Game.GetPlayer().AddSpell (MyHeavySpell01)Endif

Seems like an easy thing. Now I've learned that IsSpellTarget doesn't exist, but is there an equivalent? And any other tips are greatly appreciated :smile:
User avatar
Flesh Tunnel
 
Posts: 3409
Joined: Mon Sep 18, 2006 7:43 pm

Return to V - Skyrim