Help Request: Firing Script On Voice Power Cast

Post » Fri Jan 04, 2013 11:23 pm

I'm trying to create a script that gets called when the player uses a voice power (ex: When the player uses Unrelenting Force I want to increase destruction or some other skill). Reading through the creation kit tutorials it suggests adding a quest that starts on game start, and has a quest alias that targets the player. I've set this up and the following script is attached to the quest alias:

Scriptname cmcinnis_Script_VoicePowerCast extends ReferenceAliasEvent OnInit()		RegisterForSingleUpdate(1)EndEventEvent OnUpdate()		Debug.Notification("Hello world.")		RegisterForSingleUpdate(4)EndEventEvent OnSpellCast(Form akSpell)		Debug.Notification("Spell cast.")EndEvent

The OnInit() and OnUpdate() functions are properly called and I get the "Hello world." message every 4 seconds on the screen. The problem is the OnSpellCast() function isn't being called when I cast a spell or voice power. I'm not sure if I need to register for the event somehow like I do for the updates or not.
User avatar
Miragel Ginza
 
Posts: 3502
Joined: Thu Dec 21, 2006 6:19 am

Return to V - Skyrim