Help need to make a spell script :S

Discussions and questions about the CS and mods for Oblivion
Locked
Oblis
Initiate
Initiate
Posts: 38
Joined: Fri May 18, 2007 2:07 pm
ES Games: Daggerfall, Morrowind, Oblivion
Platform: PC
Location: Greece

Help need to make a spell script :S

Post by Oblis »

Hello!
I m trying to make a custom spell, that will be added to player's spellbook abd when he casts it on an NPC, that will turn NPC's stats on in a texbox.
I have made the script atm using GetContainer function which gives me results when i enter NPC's invtentory.
Example:

ScriptName REPORT

ref ReportTarget
String_var NPCName
Short NPCBaseHealth

Begin GameMode
set ReportTarget to getcontainer

Set NPCName to ReportTarget.GetName

Set NPCHealth to ReportTarget.GetActorValue Health

End

but i really want to change it and be activated when player cast a spell on the chanracter.
I searched a lot but cant find the correct expression to replace the set ReportTarget to getcontainer.
Can anyone help?
User avatar
PrinceShroob
Apprentice
Apprentice
Posts: 158
Joined: Wed Mar 17, 2010 7:58 pm
ES Games: Oblivion, Morrowind
Platform: Xbox 360, PC

Re: Help need to make a spell script :S

Post by PrinceShroob »

I believe the function that you're looking for is "GetSelf."
Oblis
Initiate
Initiate
Posts: 38
Joined: Fri May 18, 2007 2:07 pm
ES Games: Daggerfall, Morrowind, Oblivion
Platform: PC
Location: Greece

Re: Help need to make a spell script :S

Post by Oblis »

That worked!
Thanks
Locked