Get Actor refererence from Spell target?

Post » Tue Mar 16, 2010 3:50 pm

Hey guys thanks in advance to any replies, Ive recently started scripting and ive hit a snag thats got me tearing my hair out, hopefully someone can help!


I want to use certain functions in a Magic effect script that require a target/actor Id, but I cant figure out how to get the ID of a spells target.

For example, in a "target" magic effect script I can use "Additem 0000Etc 1" and it will add the item to whatever npc the spell hits,

BUT If I want to use a function such as "SetEssential ActorBase bool" it requires the actors ID! How do I go about this?? Much thanks!
User avatar
Michelle Smith
 
Posts: 3417
Joined: Wed Nov 15, 2006 2:03 am

Post » Tue Mar 16, 2010 3:34 pm

Could try GetSelf

Maybe use a variable like rSelf

set rSelf to GetSelf

rSelf.SetEssential

Or something to that effect might work.
User avatar
Bloomer
 
Posts: 3435
Joined: Sun May 27, 2007 9:23 pm


Return to IV - Oblivion