Jump to content
Sign in to follow this  
Kerry

Civi's with Medic Ability and Anim menu

Recommended Posts

Hey everyone,

I need some help with this upcoming mission I am working on. I am rather unexpierienced with ArmA scripting, but very framiliar with the editor. All I need is for you to point me in the right direction. I need for the iraqi civs to be able to heal people, just as a medic does in game. Also, I would like for the civ's to have an animation menu, similar if not the same one in Sahrani Life. I UNPBO'd Sahrani life, but there was just a load of scripts named 445567 (Multiple digit names), and I searched for a little bit.

Would that iraqi civ thing have to be like another addon??

thanks

kerry huh.gif

Share this post


Link to post
Share on other sites

addon wise it would be easy

not sure about a scripting solution

Share this post


Link to post
Share on other sites

What you can do is give players a action when they're close to the medic, and have the action do the following:

1: start a animation of getting healed

2: Set the damage to 0

Hold on for 2 min I'll post something that might do the trick. New to the whole editing so forgive me if I don't get it right the 1st time tounge2.gif

Share this post


Link to post
Share on other sites

Ok try this

Place a trigger and put the following in the con. field

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">( { ( _x distance medic1 )<2 }count( units group player ) )>0 AND (alive medic1) AND ((damage player)>0.1)

this on the on act. field:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">healaction = medic1 addAction [ "Heal at medic","heal.sqf" ]

Create a little script called "heal.sqf" and make it look like this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">player playMove "AinvPknlMstpSlayWrflDnon_healed";

removeAction healaction;

healaction = -1;

player setdamage 0;

exit

Now I'm not sure if this would heal just the player or all the players in the mission, I think only the player calling the script will do the animation and get healed. Please let me know if it works or not, had to rush it, I'm about to miss my train tounge2.gif

Cheers!

Share this post


Link to post
Share on other sites

Thank you!!!

I got it workin from your example:

player playMove "AinvPknlMstpSlayWrflDnon_healed"

player removeAction healaction

healaction = 1

player setdamage 0

exit

But, it doesnt remove the action once the player is healed.  confused_o.gif But, it gets removed if I go to "medic2". It will only let me heal if I am damaged at medic2...

I duplicated the script by having another trigger exec "heal2.sqs"

I also made it an sqs instead of sfs, simply because I dont know how. I use ArmA edit

Share this post


Link to post
Share on other sites

Well to be honest I don't even know the real difference between sqf and sqs... Except that SQF is the "newer, better" way of scripting...

I could probably test it out myself and fix where-ever I went wrong... But for some reason I'm unable to produce anything useful today (at least until a few hours from now confused_o.gif )

I'll help you out once my mind is a bit more straight again smile_o.gif

Share this post


Link to post
Share on other sites

>But, it doesnt remove the action once the player is healed.

Read the wiki for the addAction command. It explains how to make it disappear after use. Search google for: arma scripting commands

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  

×