on casting concentration spell scrip

Post » Mon Nov 19, 2012 4:43 pm

For a telekinetic spell i' working on I think I need to detect when the player is casting the spell (aimed concentration)
Must I use onspellcast event?
How should I attach the script to the player?
User avatar
Susan Elizabeth
 
Posts: 3420
Joined: Sat Oct 21, 2006 4:35 pm

Post » Mon Nov 19, 2012 4:22 pm

Probably the easiest way is to make the Player an Alias in a Quest

Then, add a script to the Alias and add the OnCast Event to that script. http://www.creationkit.com/OnSpellCast_-_ObjectReference

Note that you would need to translate the Alias to an ObjectReference using http://www.creationkit.com/GetReference_-_ReferenceAlias as the first thing in your Event script.

While the you made Quest is Active (started and not stopped) the routine will run on the Player (if you stop the quest, the routine will not run)

Note that the Quest would not have to do anything else: Just hold an Unique Alias that points to the Player and that Alias to have the single script and the single event trap.
User avatar
chloe hampson
 
Posts: 3493
Joined: Sun Jun 25, 2006 12:15 pm

Post » Mon Nov 19, 2012 2:13 pm

Thanks. trying
User avatar
Genocidal Cry
 
Posts: 3357
Joined: Fri Jun 22, 2007 10:02 pm


Return to V - Skyrim