Script to set player as Essential

Post » Wed Jun 20, 2012 9:16 pm

I didn't think you could set the player as essential, but apparently you can.

Anyway, I am trying to:
- Set the player as essential
- When the player enters bleedout, have their max health damaged

I'm getting a 'Set Essential is not a function or does not exist' error.

Scriptname WZTestEssential extends QuestEvent Oninit()				   Game.GetPlayer().SetEssential()endEventEvent OnEnterBleedout()		   Game.GetPlayer().DamageActorValue("health", 10)endEvent

I'm sure there are all kinds of problems with the bleedout/damage health part, just trying to get the SetEssential part to work first.

Anyway, any tips on what I am doing wrong would be greatly appreciated.
User avatar
no_excuse
 
Posts: 3380
Joined: Sun Jul 16, 2006 3:56 am

Post » Wed Jun 20, 2012 11:26 pm

Game.GetPlayer().GetActorBase().SetEssential()
User avatar
JERMAINE VIDAURRI
 
Posts: 3382
Joined: Tue Dec 04, 2007 9:06 am

Post » Thu Jun 21, 2012 12:56 am

Worked like a charm, thanks!

EDIT: Ok I need to apply the ravage health effect to the player, how do I apply potion effects?

EDIT: Actually, having serious trouble getting a script to check if the player is bleeding out to work.
User avatar
Setal Vara
 
Posts: 3390
Joined: Thu Nov 16, 2006 1:24 pm


Return to V - Skyrim