Home   Help Search Login Register  

Author Topic: AI medic how to heal unconscious player by script?  (Read 3784 times)

0 Members and 1 Guest are viewing this topic.

Offline bardosy

  • Honoured Contributor
  • ***
  • campaign designer
    • CartooDiv
AI medic how to heal unconscious player by script?
« on: 29 Jan 2013, 09:38:20 »
I created a mission and create a special medic script to it. It means, the camp have a unarmed, captive, medic alone (not in any other group) and if someone is wounded, he runs there and heal him.
But I use First Aid module and when I get shot, my state is change unconscious. The medic run to me and try to heal me by the script (not really heal, just do the animation and setDamage 0). Of course, the unconscious state didn't change. So I use setUnconscious false, but I read it's client side only (and this is a coop mission), so I put a trigger on the mission:

condition: lifeState player == "UNCONSCIOUS" and (player distance ukmedic1 < 2)
onActivation: player setUnconscious false; player setDamage 0;

And it triggered a strange action: When I got shot, I lost my commander position and start agonize with red blur. Then independent AI medic run for me. I got my commander status back, but stay in unconscious state with red blur and cannot use aim optic, cannot reload, but my hand didn't shake.
How could I give the player state back from unconscious?
Or - it could be better, but far as I read this forum I don't believed in - how can I script an independent medic to heal properly a FirstAid wound soldier?

Note: it's in vanilla ArmA2CO without any MOD.

I tried this too:
player action ["heal", ukmedic1]
But it still not working with FA module.

I put this question here, because I need to multi-compatible solution and unconscious-thing is a local thing.
Fix bayonet!