Jump to content
Sign in to follow this  
cj

Heal

Recommended Posts

Hey guys,

I was just wondering how to give an object the ability to heal players, ie. a jeep that can drive into battle and stop for people to run to it and heal off of it.

Could somebody make me a quick script or something please?

I really don't know all that much about scripting so could you explain exactly what I need to do please tounge2.gif

Cheers!

Share this post


Link to post
Share on other sites

EDIT: oops, sorry, i didn't realized that this is in "Mission editing & scripting".

Share this post


Link to post
Share on other sites

the ability to give medical aid is given in the vehicle (addon) config.

for a mission:

check the support class (medical bmp, medical m113), set up some units with a single support waypoint. they will move out when a unit is injured and ask for medical assistance.

you can also attach a trigger to a vehicle (f.e. a jeep) that checks units of the class man that are near and also checks if these units are injured or not. if they injured you can heal them with unit setdammage 0 .

but u should use the medical support units from the game, they do a good job and will try to get to any injured asking for help. ai do that automatically.

Share this post


Link to post
Share on other sites

But I wanted to give the Alloutte II (Medivac) the power to fly in and heal people in my MP mission. It is at the base, then one person can get in it and fly around healing people, not AI flying confused_o.gif

Share this post


Link to post
Share on other sites
But I wanted to give the Alloutte II (Medivac) the power to fly in and heal people in my MP mission. It is at the base, then one person can get in it and fly around healing people, not AI flying confused_o.gif

Then you need a mod like Scars09 suggests.

Or the trigger thingy to "magically" heal(setDamage 0) the units near teh heli.

Share this post


Link to post
Share on other sites

You could make a script that checked the distance between all the units and the chopper and set their dammage to 0 if they are next to it.

Share this post


Link to post
Share on other sites

Try something like this for starters, using an Action Menu item.

vehicle init field:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this addAction ["Heal me", "healMe.sqf"]

healMe.sqf:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_Unit = _this select 0;

_Caller = _this select 1;

_Id = _this select 2;

_caller setDamage 0;

hint "healing";

Share this post


Link to post
Share on other sites

Thank you SO much Dr_Eyeball, it works perfectly! biggrin_o.gif

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  

×