Remove spells?

Post » Tue Jun 19, 2012 6:05 pm

So I've compiled a script to remove a player's race powers.

using the CK wiki - http://www.creationkit.com/RemoveSpell_-_Actor



if ( Game.GetPlayer().RemoveSpell(battlecry))Debug.Notification("battle cry removed")endif

^ this is just a sample of some of my code.

Yes i've added the property and triple checked it to make sure its the correct property..type spell... "PowerNordBattleCry"

The code saves/compiles with no errors. When i test the mod though i see "battle cry removed" but the player spell is still there. Seems like it should be a fairly straight forward thing to do.

Any help?

also i've tried

Game.GetPlayer().Removeshout(battlecryshout)Game.GetPlayer().RemovePerk(battlecryperk)

Battle Cry still sits in the inventory and can be used.
User avatar
WTW
 
Posts: 3313
Joined: Wed May 30, 2007 7:48 pm

Post » Tue Jun 19, 2012 1:16 pm

I just tested a script I finished this morning that uses this function(and it didn't occur to me to check if it was truely removed until I saw this thread) and it worked as intended.

Perhaps you need to post the rest of your script, as there maybe something else affecting that.
User avatar
Haley Cooper
 
Posts: 3490
Joined: Wed Jun 14, 2006 11:30 am

Post » Tue Jun 19, 2012 7:24 pm

I created a new triggerbox and added the code by itself.
Still no results. The player spell is still in the inventory.

Scriptname RemoveSpell extends ObjectReference Event OnTriggerEnter(ObjectReference akActionRef)if ( Game.GetPlayer().RemoveSpell(battlecry))  Debug.Notification("battle cry removed")else  Debug.Notification("Something Went Wrong")endifendEventSPELL Property battlecry  Auto 
User avatar
Minako
 
Posts: 3379
Joined: Sun Mar 18, 2007 9:50 pm


Return to V - Skyrim