Jump to content
Sign in to follow this  
usmc123

First Aid Module

Recommended Posts

So yea, how can i use the init box to activate the firstaid module on a specific unit?

I'm respawning a unit which needs to have its firstaid module reactivated, how can i do this with an init command? The bohemia wiki says nothing about the firstaidmodules.

I don't know but I would like to know. Synchronizing "on the fly" with synchronizeObjectsAdd doesn't seem to work. I've read that once the module is initialized, we can't play with it's synchronization list anymore.

A work around would be to be able to delete the first aid module and recreate it when you respawn your unit. We would need to know the module name and the command to use (createunit or createvehicle?)

Anyone got infos on this?

Share this post


Link to post
Share on other sites

The FA module is a game logic called FirstAidSystem (vehicleClass = Modules), you can try with that.

Share this post


Link to post
Share on other sites

when you die with all of the first aid modules on or without the "action" my view is still red after respawn!

how do i fix that? i have a spawn 3 if that might help

Edited by BelgarionNL

Share this post


Link to post
Share on other sites

Im pretty sure thats also a bug...Noticed that in the campaign and own created stuff...BI got a lot of work to do,i personally dont use the First Aid System for now cause its just too annoying with all that bugs..

Share this post


Link to post
Share on other sites

I've got some interesting results.

To create the modules:

FAcenter = createCenter sideLogic;
FAgroup = createGroup FAcenter;

faais = FAgroup createUnit ["AlternativeInjurySimulation", [0, 0, 0], [], 0, ""];
faais synchronizeObjectsAdd [_this];

fabc = FAgroup createUnit ["BattleFieldClearance", [0, 0, 0], [], 0, ""];
fabc synchronizeObjectsAdd [_this];

Then, every time I create a new unit, I must reinitialize everything. There was two actions from the battlefield clearance module that were left on everybody: drag and carry. So I remove the last two actions (without having the action index) from everyone and it worked well.

deleteVehicle faais;
deleteVehicle fabc;

{ _tempID = _x addAction ["ToBeRemovedImmediately", "initlead.sqf"]; _x removeAction _tempID; _x removeAction (_tempID - 1); _x removeAction (_tempID - 2) } forEach units group player;

_return = if ( count units group player < 4 ) then { (_this select 0) createUnit [position player, group player, "_return = this execVM ""initbot.sqf"""] } else { hint "Group full!" };

faais = FAgroup createUnit ["AlternativeInjurySimulation", [0, 0, 0], [], 0, ""];
faais synchronizeObjectsAdd [player];

fabc = FAgroup createUnit ["BattleFieldClearance", [0, 0, 0], [], 0, ""];
fabc synchronizeObjectsAdd [player];

I've got a nice map working in single player. I will test it in multiplayer when my friend buy the game with the respawn too. I think I will be able to work around the first aid bug with respawn. I think I will have bugs with the dedicated server because "createunit" logic have a known bug with dedicated server.

Edited by norm6669

Share this post


Link to post
Share on other sites

WAUW how can you just add units into the world! that awesome! you shut put that on the download section of armaholic for instance!

it rules! can i use it for my mission?

Share this post


Link to post
Share on other sites

It's not robust enough yet.

And most importantly, it's not multiplayer ready. This is a single player proof of concept.

When it's ready, I might release something more officially.

I've reworked the code allready. I create unit in a separate group, init the first aid on them, then join them to the main group. This way I don't need to mess with the actions blindly.

I created a respawnable multiplayer map and fixed the red screen bug AND invulnerability bugs. The trick is to reinitialize the variable and restart the agony.fsm and damaging.fsm. Maybe it's possible to do it with less variable but why take chance when it's logical and it work.

	player setVariable ["head_hit",0,true]; 
player setVariable ["body",0,true];
player setVariable ["hands",0,true];
player setVariable ["legs",0,true];
player setVariable ["bloodlossPerSecond",0,true];
player setVariable ["bloodloss",0,true]; //blood loss in liters, 3+ is fatal
player setVariable ["",0,true]; //empty name variable works - accumulates structural dammage

player setVariable ["BIS_IS_agonyDam",BIS_IS_agonyDam,true]; //_x will be in agony if it has damage of BIS_FA_agonyDam or more
player setVariable ["BIS_IS_inAgony",false,true]; //not in agony at start

player setVariable ["injured", false];
player setVariable ["BIS_IS_Dead", false];

_nic = [player] execFSM "\ca\Modules\AIS\data\fsms\agony.fsm";
_nic = [player] execFSM "\ca\Modules\AIS\data\fsms\damaging.fsm";

Here ya go. Probably not bug free yet but good enough to start a thread just for it. Will be easier to post update and discuss various stuff.

http://forums.bistudio.com/showthread.php?p=1376254#post1376254

Edited by norm6669

Share this post


Link to post
Share on other sites
I am getting a bizarre bug with the first aid module:

If a man is injured and the units begin healing him, they will call "ready" just before they start the healing animation, and then get stuck in the healing animation forever, and their patient remains incapped.

HOWEVER. If i press escape, go to vid mem settings, and press done (occasionally I have to make it go 'receiving' but not always) then all characters that were trapped in the healing animation immediately heal their man and get unstuck. Wtf? I have to do this every time a unit gets stuck in the healing animation, which is around 90% of the time.

I have 2 first aid modules (sim and clearance) linked to all groups, I had several triplets before (sim, clearance, and action) linked to each 'cluster' of units, but it also had this bizarre bug.

I don't understand why going to vid mem (edit: I meant Video Options) settings would fix it, other than that the game reloads and refreshes everything, including the first aid mod (maybe there is a way to make the first aid mod automatically refresh every x seconds to keep this from happening?)

Edit: Entering the map and exiting (m), fixes any infinite heals as well.

I still have this happen sometimes. I'm using AIS and BC sync'd to group leader. If one of my team mates gets incap and I try to use "first aid" the animation gets stuck.

Share this post


Link to post
Share on other sites

Never ever had this bug.

If you can find a way to recreate it, we can find a way to fix it.

Just to be sure here are the basic (that much people know by now):

  • ONE Alternative Injury Simulation module synched to ONE guy in the group.
  • ONE Battlefield Clearance module synched to ONE guy in the group.

Because otherwise it could double start some stuff. I experienced a lot with this module and I can confirm that when it initialize, it process everyone from the group.

Also, it would be interesting to study if synching two group to a module is really supported. I use a module for each group. I haven't checked if the module can pass an array of group.

Edited by norm6669

Share this post


Link to post
Share on other sites

norm , are you using the multiplayer framework at all with that code (or generally when making MP missions for that matter)

where did you execute those lines of code on respawn? seperate script?

Share this post


Link to post
Share on other sites

no multiplayer framework. I runned the mission for the first time in MP yesterday and saw the mess.

am working on a new version.

Share this post


Link to post
Share on other sites

now what do we do to get the option to do drag and first aid after you have respawned???

Share this post


Link to post
Share on other sites

The option to drag and carry are added via this line:

_nic = [_unit] execVM "\ca\Modules\BC\data\scripts\BC_addActions.sqf";

For the first aid itself, I never had to reinitialize it.

Share this post


Link to post
Share on other sites

Is there a way of using the script globally on every unit in a mission? If it could work on respawning units that would be great too.

Share this post


Link to post
Share on other sites

If you run the code again on a new member of your group, you might end up with some people with 2-3 "drag" options.

You need to reinitialise the first aid very carefully and not over do it. So to do it at large on a big group would be risky.

Share this post


Link to post
Share on other sites
Hi,

I placed all three First Aid Modules and sync them with the group leader.

But the First aid only works if i am a medic, if i play Coops the "first aid animation" is shown but the wounded soldier is still wounded...

Is there any special trick to use first aid with every unit i want ??

Yeah in the config.cpp of your custom soldier put

attendant = true;

that will give that soldier the ability to heal people like a medic.

Share this post


Link to post
Share on other sites

hi all

im try to put a soldier in steate of agony (adds agony state - unit is incapacitated to some degree (no commanding, no actions, limited movement) - but can move slowly on ground and even shoot ) at start of a mission.

some one can tell me how do it?:(

Edited by manolo007

Share this post


Link to post
Share on other sites

The problem i am encountering is not directed at respawn, but also at join in progress.

My server runs all missions with Respawn 4, so that a player is dead, and cannot come back. But the problem i find is that when a player joins, he is unable to heal existing players and existing players cannot heal him.

I have tried several variations on test maps, from FAIS and BC, to including the 3rd module, Action. I have syncronized the modules to all players, to just the leaders of groups. Seperate modules to seperate groups, and syncronizing from and to, and to and from modules to players.

I am unsure why BI have not fixed this. Especially for the join in progress to a server. In this pug, you have the option to heal, but cannot do it.

Any latest developements anyone knows of, as 1.05 patch has not delievered any good news for this problem?

Share this post


Link to post
Share on other sites

I tried this module in one of my multiplayer missions and ran into some really weird bug. Once I've been in a wounded state and respawned (Using the built-in respawn) the enemy AI completely ignore me.

I can walk amoung them and even shoot them without any reaction from them.

Has anyone else experienced this and how do I fix?

Share this post


Link to post
Share on other sites

does the first aid module that allows you to drag work with ace wounds module?

It would be nice if ai would drag ace wounded soldiers and then treat them using that system, rather than using slx mod.

---------- Post added at 05:07 ---------- Previous post was at 05:05 ----------

I tried this module in one of my multiplayer missions and ran into some really weird bug. Once I've been in a wounded state and respawned (Using the built-in respawn) the enemy AI completely ignore me.

I can walk amoung them and even shoot them without any reaction from them.

Has anyone else experienced this and how do I fix?

thats because there is a known bug with the module that when u enter the state of critically wounded, it sets you to side civilian, so enemy will not shoot at you when your down. however if you do get in this state and end up respawning in an mp game it does not switch you back to your original side.

Share this post


Link to post
Share on other sites
does the first aid module that allows you to drag work with ace wounds module?

It would be nice if ai would drag ace wounded soldiers and then treat them using that system, rather than using slx mod.

---------- Post added at 05:07 ---------- Previous post was at 05:05 ----------

thats because there is a known bug with the module that when u enter the state of critically wounded, it sets you to side civilian, so enemy will not shoot at you when your down. however if you do get in this state and end up respawning in an mp game it does not switch you back to your original side.

No. Never use the BIS first aid modules with the ACE wound system. The ACE2 one allows dragging.

Share this post


Link to post
Share on other sites

How to get variable or something to know if player is carried by another player?

Share this post


Link to post
Share on other sites

Hi all. Is there a way to delay dying with this module for example 3 to 5 minutes. My reason is that I dont want respawn in my coop mission but dont want players to die instantly. I do however want them to have the chance to be healed before they are out of the game, so a delay would be the ideal solution :)

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  

×