Jump to content
Sign in to follow this  
CMajor28

Healing Trigger

Recommended Posts

How do I make a trigger that activates when only the player heals somebody. It may be a trigger condition or an if/then statement. Either would be fine.

Share this post


Link to post
Share on other sites

I think it may be a little tricky.

 animationstate player == "ainvpknlmstpslaywrfldnon_healed2" 

may work but there maybe several types of healing animation so you may need to place all the various types into an array.

animationstate player in ["ainvpknlmstpslaywrfldnon_healed2","place_more_animations_here"];

Share this post


Link to post
Share on other sites

Okay I'll try them.

EDIT: Nothing worked, but I may have an idea. The unit who needs heeling stays prone unit he is healed. What is a trigger condition or if\then statement activated by a unit standing?

Edited by CMajor28

Share this post


Link to post
Share on other sites

Sorry I couldn't test last night so your right it didn't work.

I've just done a quick check and this is working for me now in A2/OA

animationstate player in ["ainvpknlmstpslaywrfldnon_medic" ,"ainvpknlmstpsnonwrfldr_medic0s"]

Share this post


Link to post
Share on other sites

It's no problem. It was late for me anyway. Yeah, I'll try that. Thanks for your help.

EDIT: This does work, but not with if\then statements and I'm assuming while\do also. But it does work with this in the trigger condition.

Edited by CMajor28

Share this post


Link to post
Share on other sites

I don't see any reason for it not to work in if/while, again can't test right now but this should work.

if (animationstate player in ["ainvpknlmstpslaywrfldnon_medic" ,"ainvpknlmstpsnonwrfldr_medic0s"]) then {hint "healing"};

Share this post


Link to post
Share on other sites

That actually doesn't work for me. But, it works fine for it being in a trigger. But I may be the only one. My arma 2 has been acting up bad lately. Like I'm stuck trying to fix this mission i made where all the op for are setcaptive true and I didn't even do it and can't undo it. Also my secop manager is missing half the language.

Share this post


Link to post
Share on other sites

An if statement will execute instantly so it would need to be in a loop

in script :-

while {true} do {
if (animationstate player in ["ainvpknlmstpslaywrfldnon_medic" ,"ainvpknlmstpsnonwrfldr_medic0s"]) then {hint "healing"}; 
sleep 1;
};

or a waituntil

waituntil {(animationstate player in ["ainvpknlmstpslaywrfldnon_medic" ,"ainvpknlmstpsnonwrfldr_medic0s"];sleep 1)};
hint "healing";

You can use them in the editor but you will need to spawn them

null=this spawn { above code goes here };

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  

×