Jump to content
Sign in to follow this  
kuwahara<ANZAC>

Medic/Treat Wounds script help!

Recommended Posts

I am atempting to make 2 scripts that can add a "Treat Wounds" menu to any object/veh/unit.

ok im callin on objects init.

--------

[this] exec "set_medic.sqs";

--------

then the set medic script looks like this.

--------

_medic = _this select 0

_medic setCaptive true

_medic addAction ["Treat Wounds", "Treatwounds.sqs"]

--------

ok thats where the problem begins, i have no idea how to do the things i need to do in the Treatwounds.sqs

if one of the guru scripters out there can help me i would apreciate it LOTS!

these are the results i need.

1. player crouches down.

2. 2-3 second delay.

3. players health retured to full.

as i said, any help would be apreciated alot.

Share this post


Link to post
Share on other sites

addAction ["treatwounds","treatwounds.sqs"] Creck?

So inside of the script you'll wanna type this, but i may just be wrong. If so, euh.... sorry.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">(_medic distance _hurtGuy < number)

_medic switchmove "medic"

~4

_hurtGuy setHealth 1

exit

Hopefully it works, even though i have not tried it, it should work...

Share this post


Link to post
Share on other sites

That won't work. _medic and _hurtguy aren't defined and there is no setHealth command.

Try this:

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

_treated = _this select 1

_actionID = _this select 2

?_medic distance _treated > 3: exit

?"Man" countType [_medic] > 0: goto "medicman"

_treated playmove "Treated"

~3

_treated setdammage 0

exit

#medicman

_medic playmove "Medic"

_treated playmove "Treated"

~3

_treated setdammage 0

exit

Share this post


Link to post
Share on other sites

There is too a setHealth command, cuz I have used that. but i have realised that i was wrong about a couple of things. sad_o.gif

THX for the right script. I've been wondering how to make any guy a medic... u rok. notworthy.gif

Share this post


Link to post
Share on other sites

Nope, sethealth will only produce an error message.

If you use that script you might want to add a check that prevents healing at dead medics such as:

?!(alive _medic): _medic removeAction _actionID; exit

Share this post


Link to post
Share on other sites

WTHeck? It worked! I say--- or maybe it was setfuel, and ammo... ORRRR!!! It could be that i have goty. (Probably not tho)

Share this post


Link to post
Share on other sites

Well go ahead and try. Perhaps it was a dream wow_o.gif

You could make a setHealth function though but then the syntax would be different:

setHealth = {(_this select 0) setDammage (_this select 1)}

[player, 0.901] call setHealth

Share this post


Link to post
Share on other sites

I do know i've used setfuel and setammo, but the sethealth could have been a dream. Or querty was always on my side! biggrin_o.gif  pistols.gif  help.gif  goodnight.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  

×