Jump to content

Can't get 3rdPUseStimpakOnSelfOnGround to play


Pelgar

Recommended Posts

The idle did not play but it had some interesting results. I tried Playidle 3rdPUseStimpakOnSelfOnGround with healthy Curie selected. The anim did not play but the console generated a line saying GetActorValue: RightMobilityCondition >> 100. This makes me think maybe the NPC would not play the anim if they are healthy. So I shoot Curie in the head and try again but the results were exactly the same. Next I tried setting RighMobilityCondition to 10 and tried playidle again. I got the same line except it reported the new (10) value. So I set RightMoblitlyCondition to 0 and try again. Now the console reports GetActorValue: LeftMobilityCondition >> 100. I then set LeftMobilityCondition to 0 and try playidle again but noting happens.

The bottom line is this all leads me to believe that if I get the right condition set the idle may actually play.

Link to comment
Share on other sites

That idle does have conditions to be met to play (both legs crippled for instance). Instead of playing an idle would it work if you crippled Jenny's legs, and then had her equip a stimpak, then called Jenny.ResetHealthAndLimbs? Unsure if an NPC would play a stimpak idle if done that way - or if that's the effect you're looking for.

Link to comment
Share on other sites

I don't know if it would work but I'll sure give it a try. When you meet Jenny in the game she is sitting on the floor, at a woundedSit Furniture marker. I've been thinking that the furniture marker was probably the reason the idle would not play.

When the PC gives Jenny a stimpak she gets up, walks to the next room and shoots one to three Gunners. I'd just like for her to play a stimpak animation when the pc gives her the stimpak. It would be fine with me if the PC stimpaked her the way he does a downed companion but how to force that to happen has eluded me for about six months now.

 

I'll try as you suggeseted, crippling her and having her equip a stimpack.

Link to comment
Share on other sites

Crippling both legs and having her equip a stimpak worked in the console. She even played the stimpak anim while siting in the furniture idle marker. Thanks Octodecoy. I'll add a couple Phases to the scene and see if I can get it to work in script.

Link to comment
Share on other sites

I finally got Jenny to using the stimpak on herself. It was quite difficult to find the right combination of functions to damage health, restore health and play nice with each other. The only problem I have with it now is the stimpak is left sticking in Jenny's wrist until she exits the furniture idle (probably nothing I can do about that). The code below is the relevant parts of a much larger quest script. I'm not asking for any help here just showing how it was accomplished.

ScriptName CompJennyIntroScript extends Quest conditional

ReferenceAlias Property Alias_Jenny Auto Const
ActorValue Property RightMobilityCondition Auto Const
ActorValue Property LeftMobilityCondition Auto Const
Potion Property Stimpak Auto Const
int Property JennyWaitTimerID Auto Const
bool Property bJennysRevengeReady Auto conditional

Function JennyStimpakSelf()
	Actor Jenny = Alias_Jenny.getActorReference()
	float fLeftMob = Jenny.GetValue(LeftMobilityCondition)
	float fRightMob = Jenny.GetValue(RightMobilityCondition)
	Debug.Trace("JennyStimpakSelf: Before damageValue LeftMobilityCondition = " + fLeftMob)
	Debug.Trace("JennyStimpakSelf: Before damageValue RightMobilityCondition = " + fRightMob)
	Jenny.damageValue(LeftMobilityCondition,100)
	Jenny.damageValue(RightMobilityCondition,100)	

	fLeftMob = Jenny.GetValue(LeftMobilityCondition)
	fRightMob = Jenny.GetValue(RightMobilityCondition)
	Debug.Trace("JennyStimpakSelf: After damageValue LeftMobilityCondition = " + fLeftMob)
	Debug.Trace("JennyStimpakSelf: After damageValue RightMobilityCondition = " + fRightMob)	
	Utility.Wait(0.5)
	Jenny.Additem(Stimpak, 1)
	Utility.Wait(0.5)
	Jenny.Equipitem(Stimpak)
	IF JennysRevenge.IsPlaying()
		JennysRevenge.Stop()
	EndIf
	StartTimer(3, JennyWaitTimerID)
EndFunction

Function ResetJennysHealth()
	IF JennysRevenge.IsPlaying()
		JennysRevenge.Stop()
	EndIf
	Actor Jenny = Alias_Jenny.getActorReference()
	Jenny.ResetHealthAndLimbs()
	float fLeftMob = Jenny.GetValue(LeftMobilityCondition)
	float fRightMob = Jenny.GetValue(RightMobilityCondition)
	Debug.Trace("ResetJennysHealth: After ResetHealthAndLimbs LeftMobilityCondition = " + fLeftMob)
	Debug.Trace("ResetJennysHealth: After ResetHealthAndLimbs RightMobilityCondition = " + fRightMob)	
	PlayerMeetJenny.Stop()
	SetJennysRevenge(True)
	JennysRevenge.Start()
EndFunction

Function SetJennysRevenge(bool bReady)
	bJennysRevengeReady = bReady
EndFunction

Event onTimer(int iTimer)
	If iTimer == JennyWaitTimerID
		ResetJennysHealth()
	EndIf
EndEvent

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...