Jump to content
Sign in to follow this  
JDog

First aid thing... can I disable "First Aid" while keeping "Drag"?

Recommended Posts

Trying to create a short scenario where the player is forced to drag or carry an injured person, but I don't want them to be able to heal the person since then they can walk on their own again. Any suggestions?

---------- Post added at 12:10 AM ---------- Previous post was at 12:05 AM ----------

Update: OK well if I use JUST battlefield clearance... the player can still drag/carry if the target is alive but just cant stand on his own. However if I do this... is there any command I can execute to put the target into this not-able-to-stand state? setDammage cant make him unable to walk :(

Edited by JDog

Share this post


Link to post
Share on other sites

You can disable the heal of FAS.

_x setVariable ["BIS_FA_healer",false,true]; //_x is first-aiding somebody

_x setVariable ["BIS_FA_healEnabled",true,true]; //option to heal - gives action, prevents fast healer.sqf reexecute (see end of healer.sqf)

_x setVariable ["BIS_FA_canHealTo",0.5,true]; //First-Aid given by _x will heal injured to no less than 0.5 damage //see at what damage agony ends

Share this post


Link to post
Share on other sites

hm, trying to execute those with the player name in place of _x but doesn't seem to be doing anything. I wouldn't even know where to look and find the BIS functions either, unfortunately, to see what those parameters do and try tweaking it.

Share this post


Link to post
Share on other sites

P:\ca\modules\FA\data\scripts

Share this post


Link to post
Share on other sites

Man I'm tellin you... I haven't been one to tear open the .pbo files much lol. I opened the Ca.pbo file but that didn't have a modules folder in it :(

For those commands up there, do I use them as they are there? Do I have to use them all or do they each do the same thing basically?

---------- Post added at 10:39 AM ---------- Previous post was at 10:38 AM ----------

Or is there even just a way to inflict damage on a certain person of the body? That'd be easier too lol.

Share this post


Link to post
Share on other sites

I assume you have a unit who you want to be permanently unconscious right? I've done this in a mission, I can help you out later when I get home.

Share this post


Link to post
Share on other sites

Well permanently unconscious when a certain trigger is executed, yea. And cool lookin forward to it.

Ok thought I'd throw this in there too... any way to prevent the player's icon from becoming red after entering/exiting a vehicle that's heavily damaged?

Edited by JDog

Share this post


Link to post
Share on other sites

You ready for this?

this setCaptive true; this disableAI "ANIM";
this setHit ["body",0.7]; this setHit ["legs",0.9];
this setHit ["arms",0.6]; this setHit ["head_hit",0.3];
this setVariable ["BIS_noCoreConversations", true, true];
injuredAnim = this spawn {
  _this switchMove "AinjPpneMstpSnonWnonDnon";
  waitUntil{!medicTreatingCaptive};
  _this setVariable ["BIS_IS_inAgony",true];
  _this setVariable ["BIS_IS_agonyDam",0,true];
  waitUntil{
     if(_this getVariable "BIS_IS_inAgony")then{_this setVariable ["BIS_IS_inAgony",true]};
     !(alive _this)
  };
  _this setVariable ["BIS_IS_inAgony",false,true];
};
captiveShowSignsOfLife = this spawn {
  _gestures = ["GestureSpasm0Weak","GestureSpasm1Weak","GestureSpasm2Weak","GestureSpasm3Weak","GestureSpasm4Weak","GestureSpasm6Weak"];
  _timer = 0;
  waitUntil{
     if(animationState _this != "AinjPpneMstpSnonWnonDnon")then{
        _this playActionNow "GestureNod";
        waitUntil{!(alive _this) || (animationState _this == "AinjPpneMstpSnonWnonDnon") || (animationState _this == "AinjPfalMstpSnonWnonDnon_carried_down")};
        if(animationState _this == "AinjPfalMstpSnonWnonDnon_carried_down")then{
           _this playMoveNow "AinjPpneMstpSnonWnonDnon";
           waitUntil{animationState _this == "AinjPpneMstpSnonWnonDnon"}
        };
        _timer = 0
     };
     if(_timer <= 0 && alive _this)then{
        _gesture = _gestures select (floor random 6);
        _this playAction _gesture;
        _timer = 120
     }; 
     sleep 0.5; 
     _timer = _timer - 0.5; 
     !(alive _this)
  };
  _this playActionNow "GestureNod";
  _this setHit ["head_hit",1];
}

You will need to modify the "injuredAnim" part to remove where it waits for a medic to stop "treating" him. You will also need to sync the unit to a BC module, but don't sync him to any first aid modules.

Btw, this is all init field code... I know I'm really lazy aren't I?

Share this post


Link to post
Share on other sites

Wow ok... I'll try and figure that out :P

Edit:

Awesome! Got it to work in a trigger too. Thanks Dawg you rock! Just wondering though... how much of that is really needed? If "setHit" can apply damage directly to the legs... would that be all I ever needed? And to sync a BC mod?

Edited by JDog

Share this post


Link to post
Share on other sites

Cool that works wonderfully. So now... last problem remaining is that when he's laid down/attached to a boat... he falls through it. I figured out why... it's because if you lay him down in it while carrying... the player is still in the carrying animation. Clicking "stop carrying" or "get in..." resets the animation and in turn does so for the incapacitated person also.

Easiest way around this would be to set the condition for the action to load the person to recognize whether or not he's being carried. Any suggestions how I could go about that? Either check animation or check if carried? I don't have a clue how to check if someone is being carried or not.

Share this post


Link to post
Share on other sites

Check the FA/BC module scripts. There is a variable that you can get on either the carried or carrying person to see if they are being carried/dragged.

Share this post


Link to post
Share on other sites

Eh I was lazy and just wanted to finish the mission. Made is so the both the rescuer and rescued have to be a certain distance away for the action to show.

Rescuer distance boat < 4

Rescued distance boat > 6

So that forces the player to set him down haha, dialogue to go with it and explain it, of course :)

Mission is all done and awesomeness now, only thing weird is that when he's attachTo'd the boat lying down in it, you can only see him in third person really. In first person it doesnt look like he's there, but there isn't a way to work around that im pretty sure, just the engine.

Share this post


Link to post
Share on other sites
Mission is all done and awesomeness now, only thing weird is that when he's attachTo'd the boat lying down in it, you can only see him in third person really. In first person it doesnt look like he's there, but there isn't a way to work around that im pretty sure, just the engine.

That's just the way the engine renders first person LODs for vehicles. Basically, every part of the vehicle's model is drawn on top of everything else in the world, regardless of its position. The only solution would be to put the unit in a cargo/crew proxy.

Share this post


Link to post
Share on other sites

proxy = position? but then i couldnt get the effect of him lying down incap'd :(

Share this post


Link to post
Share on other sites
proxy = position? but then i couldnt get the effect of him lying down incap'd :(

Sure you can. You can apply any animation to units in crew/cargo positions.

Share this post


Link to post
Share on other sites

hm... and i could place him in the middle still with attachTo?

i'd still have to use a crrc instead then instead of a russian pbx... and explain why its there lol. cuz as it stands now, the pbx only has room for 4 anyway, another reason attachTo is used for this.

Share this post


Link to post
Share on other sites

Wow this actually works very well. However it seems that every time I get something to work, another small problem comes to light lol. Now... I can get the person to lie flat and be seen in first person (pretty awesome looking)... but I can't use attachTo to set their position. As it stands, their head and upper torso is exiting the boat lol. I could try setPos but I think that would unassign them from the vehicle.

Share this post


Link to post
Share on other sites

There is no way to reposition someone while keeping them inside a vehicle cargo/crew position. You can try different combinations of animations and cargo positions that might place him better.

Share this post


Link to post
Share on other sites

Well Big Dawg, thanks for the suggestion. This actually came out pretty cool I think. Hopefully no one will click this who's crazy afraid of spoilers if they decide to play the mission later.

lzf_ZHs43x0

So it's pretty much all done now minus a few last voice-overs. Now I'm, for some reason, encountering a few small new problems at the end of things that have been in since the beginning and have never messed up before in my ridiculous amount of play-throughs lol. Bah this gets frustrating when I don't mess with things that work and they suddenly start to have a chance to mess up!

Edited by JDog

Share this post


Link to post
Share on other sites

im trying to use ace with this and im assuming its impossible. can anyone answer for sure?

Share this post


Link to post
Share on other sites

heres a question: is it possible to heal an unconscious unit, such that it will not make him die (via the timer on unconscious units) but will still render him unconscious, and healed? I have the first two parts working, problem is, is that a medic will be in an infinite loop trying to heal the unit.

Reason Im asking is to complete my Medevac script, this way I can have unconscious units carried to a medevac chopper and flown out of the zone without dying, and without the medics being stuck trying to heal them forever.

possible?

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
Sign in to follow this  

×