Script NPC Force

Post » Fri Feb 18, 2011 7:38 pm

HI

I make a script for NPC, i want apply him a "god" mod for a time and after disable invincibility.

I can use ForceActorValue Health for fixe his health and make a "god" mod, But i don't know how unforce this to back to normal health script.

How i can do this?

Thanks
User avatar
Kelly Upshall
 
Posts: 3475
Joined: Sat Oct 28, 2006 6:26 pm

Post » Fri Feb 18, 2011 7:59 pm

It's better to use SetAV Health for this. First, save his original health value as a variable, then set his health to whatever you want and then restore his health to normal using the variable. The script would look something like:

scn NPCGodModeScriptShort BHealthBegin ScriptEffectStartSet BHealth to NPCRef.GetAV HealthNPCRef.SetAV Health 99999999EndBegin ScriptEffectFinishNPC.SetAV Health BHealthEnd

User avatar
Lyd
 
Posts: 3335
Joined: Sat Aug 26, 2006 2:56 pm

Post » Fri Feb 18, 2011 6:14 pm

Good idea, i will try, but can i remove "health circle bar" from NPC when he is hit?
User avatar
Brian LeHury
 
Posts: 3416
Joined: Tue May 22, 2007 6:54 am

Post » Fri Feb 18, 2011 10:10 pm

can i remove "health circle bar" from NPC when he is hit?

Hmm...I don't know of a way to do that. There may be an OBSE function that can, though.
User avatar
leni
 
Posts: 3461
Joined: Tue Jul 17, 2007 3:58 pm

Post » Sat Feb 19, 2011 7:17 am

Finaly i had use another solution but thanks for your idea
User avatar
Ross Zombie
 
Posts: 3328
Joined: Wed Jul 11, 2007 5:40 pm


Return to IV - Oblivion