Finding out if the player is crippled

Post » Fri May 13, 2011 6:47 pm

Hey guys, I'm new to the GECK and was wondering how I can find out if the players head is crippled.

I tried IsLimbGone, but it seems that's only for checking if a limb was dismembered, not crippled.

Spoiler is code I tested this with, maybe you can point me in the right direction if I'm doing something wrong.
Spoiler

;    * NONE = -1;    * TORSO = 0;    * HEAD_1 = 1;    * HEAD_2 = 2;    * LEFT_ARM_1 = 3;    * LEFT_ARM_2 = 4;    * RIGHT_ARM_1 = 5;    * RIGHT_ARM_2 = 6;    * LEFT_LEG_1 = 7;    * LEFT_LEG_2 = 8;    * LEFT_LEG_3 = 9;    * RIGHT_LEG_1 = 10;    * RIGHT_LEG_2 = 11;    * RIGHT_LEG_3 = 12;    * BRAIN = 13 ;      [ActorREF.]IsLimbGone LimbIndexscn mLimbGoneTestbegin onActivate	if ( player.IsLimbGone -1 )		player.additem Stimpak 1	elseif ( player.IsLimbGone 0 )		player.additem Stimpak 2	endifend

Tested on a character with no crippled limbs. Used an NPC as the activator.

User avatar
hannah sillery
 
Posts: 3354
Joined: Sun Nov 26, 2006 3:13 pm

Post » Fri May 13, 2011 12:15 pm

Hey guys, I'm new to the GECK and was wondering how I can find out if the players head is crippled.

I tried IsLimbGone, but it seems that's only for checking if a limb was dismembered, not crippled.



To check for head crippling, use this:

If player.GetAV PerceptionCondition <= 0

User avatar
Zach Hunter
 
Posts: 3444
Joined: Wed Aug 08, 2007 3:26 pm

Post » Fri May 13, 2011 7:53 am

To check for head crippling, use this:

If player.GetAV PerceptionCondition <= 0


Is there no way to check for a limb's condition through a script? :(
User avatar
Clea Jamerson
 
Posts: 3376
Joined: Tue Jun 20, 2006 3:23 pm

Post » Fri May 13, 2011 3:37 pm

Is there no way to check for a limb's condition through a script? :(


You can use that in a script. If you want to see what the current condition is use "player.GetAV PerceptionCondition" The code above I used, checks to see if the limb (the head) has been reduced to 0 or less (though technically I dont believe damage can reduce limbs to less than 0)

Looking at part of your code above, if you want to add a Stimpak to the player, when his head is crippled, this will work:

if player.GetAV PerceptionCondition > 0    player.AddItem Stimpak 1              ; add 1 if head is not crippledelseif player.GetAV PerceptionCondition <= 0    player.AddItem Stimpak 2               ; add 2 if head is crippledendif

User avatar
April
 
Posts: 3479
Joined: Tue Jun 20, 2006 1:33 am

Post » Fri May 13, 2011 8:18 pm

Ah I see now. Thankyou!
Sorry for my idiocy, it looked like you were checking for the value of Perception to me.
User avatar
Lisa
 
Posts: 3473
Joined: Thu Jul 13, 2006 3:57 am

Post » Fri May 13, 2011 3:12 pm

Ah I see now. Thankyou!
Sorry for my idiocy, it looked like you were checking for the value of Perception to me.


No worries. Regarding limbs, here's how they are checked/modified/accessed in FO3/NV.

Head = PerceptionCondition
Torso = EnduranceCondition
R Arm = RightAttackCondition
L Arm = LeftAttackCondition
R Leg = RightMobilityCondition
L Leg = LeftMobilityCondition
User avatar
Paula Ramos
 
Posts: 3384
Joined: Sun Jul 16, 2006 5:43 am


Return to Fallout: New Vegas