How to detect a target of a spell

Post » Tue May 17, 2011 9:36 am

Basically I have a spell the player can fire and I want to detect who the target is so that I may bestow a certain buff on him when the spell effect ends. The spell is single target touch. I know how to do it using OBSE, but is there a way to do it without using OBSE (and no, I don't want to hear replies such as "Use OBSE", "What's wrong with OBSE?", etc.)
User avatar
Miss K
 
Posts: 3458
Joined: Sat Jan 20, 2007 2:33 pm

Post » Tue May 17, 2011 12:00 am

Basically I have a spell the player can fire and I want to detect who the target is so that I may bestow a certain buff on him when the spell effect ends. The spell is single target touch. I know how to do it using OBSE, but is there a way to do it without using OBSE (and no, I don't want to hear replies such as "Use OBSE", "What's wrong with OBSE?", etc.)

You could use the initial spell to add a token to the target. The token can use a timer and just add the buff after the initial spell ends. Or, it could be set up to use http://cs.elderscrolls.com/constwiki/index.php/IsSpellTarget in some way.
User avatar
Amy Gibson
 
Posts: 3540
Joined: Wed Oct 04, 2006 2:11 pm

Post » Tue May 17, 2011 2:11 pm

Basically I have a spell the player can fire and I want to detect who the target is so that I may bestow a certain buff on him when the spell effect ends. The spell is single target touch. I know how to do it using OBSE, but is there a way to do it without using OBSE (and no, I don't want to hear replies such as "Use OBSE", "What's wrong with OBSE?", etc.)
This is really simple. You can either use the ScriptEffectFinish block on the spell script (which runs when the spell finishes) or add a scripted token to the actor, as Vyper mentioned.
User avatar
Brad Johnson
 
Posts: 3361
Joined: Thu May 24, 2007 7:19 pm


Return to IV - Oblivion