Jump to content
Fiddi

Make a unit limp, without damage.

Recommended Posts

Hello,

 

I was wondering if there was a way to make a unit limp and have blood on their legs (possibly other bodyparts too) without actually damaging them.

 

What I'm using now is setHit, it works but the medics and those with "first-aid kits" get the action to heal the unit. I want him to limp and be bloody!

 

So the way I see it, either use a handleHeal to keep the bodyparts bloody and damaged, but that gives the action (maybe someway to remove said action?), or somehow add blood and limping without damage.

 

Any ideas?

 

Thanks

Share this post


Link to post
Share on other sites
player playmove "amovpercmlmpsraswrfldf"; // Erect version of limping
player playmove "amovpknlmlmpsraswrfldf"; // Crouched version of limping

You can find them using the animations viewer.  Or write them to the .rpt file by playing this code in the debug window (that's how I found these two animations just now):

player setHit ["legs", 1]; 
nul=[] spawn {while {true} do {sleep 1; diag_log format ["%1",animationstate player];};};

Share this post


Link to post
Share on other sites
player playmove "amovpercmlmpsraswrfldf"; // Erect version of limping
player playmove "amovpknlmlmpsraswrfldf"; // Crouched version of limping

You can find them using the animations viewer.  Or write them to the .rpt file by playing this code in the debug window (that's how I found these two animations just now):

player setHit ["legs", 1]; 
nul=[] spawn {while {true} do {sleep 1; diag_log format ["%1",animationstate player];};};

 

Can they still operate normally then?

 

What I'm after is the ability to have him in my group and still be able to order around and enter vehicles etc. just while limping and looking bloody.

Share this post


Link to post
Share on other sites

Nah, my suggestion is for cutscene visual effects only.  You want him to follow orders, then you need to set the damage to 1 on the leg.

 

Are you saying that once a unit is limping he no longer follows orders?

Share this post


Link to post
Share on other sites

Nah, my suggestion is for cutscene visual effects only.  You want him to follow orders, then you need to set the damage to 1 on the leg.

 

Are you saying that once a unit is limping he no longer follows orders?

 

No, he follows orders, just takes a long time to go there, he's limping. But the problem is that I get the "treat soldier" while he's limping and it's quite annoying but besides that it works perfect.

 

I have the setHit on a loop, so that he's limping even if I heal him, like so:

[_officer, {
	_officer = _this;
	while {_officer getVariable ["doLimp", true]} do {
		_officer setHit ["hands", 0.5];
		_officer setHit ["legs", 0.5]; // 0.5 is the threshold for limping and blood showing up.
		Sleep 2;
	};
}] remoteExec ["spawn"];

  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks for posting your code...may be useful to someone else some day.

 

I don't think there is a way around hearing "heal soldier" from group leader.  If the limping dude himself is complaining you could  setSpeaker "NoVoice"

on him to make him silent.

 

Good luck.

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×