Jump to content
Sign in to follow this  
Purzel

Condition: If AI-Unit is wounded, then trigger something

Recommended Posts

Hi there,

its me again, the scripting noob... (I will never see the light...!)

I´m not sure, how to get a condition, if someone is wounded.

In my mission an AI-unit should surrender to human Multiplayers, if the AI-unit is wounded and then follow the human team.

A warlord is at a meeting, he will flee if shots are fired,maybe shot back at my team, but if our (human) team gets him (undeadly!) hit, he should drop his weapon and surrender.

My trigger until now:

Condition:

that´s why I´m here... a big "?"

Activation:

EAST setFriend [WEST, 1];Warlord JoinAsSilent Team1;

Is it possible to "setfriend" just ONE Unit..?

How do I let him drop his weapon?

Is it possible to let him surrender with his hand behind his back oder up in the air?

How can I get him integrated into the team, so i can command him to get into e.g. an extraction chopper,

but his buddies should fire at my team, but not at him...

Any suggestions?

I´m not that firm with english language, so i have no clue, for what I have to search and much more no clue about scripting!

Sorry for that.

Thanks for help

Purzel

Share this post


Link to post
Share on other sites

conditon

(damage unit_AI)>0.1

on act

unit_AI setcaptive true;removeallweapons unit_AI ;[unit_AI] JoinSilent Team1; unit_AI action ["surrender"]; 

You can adjust the level of damage detected

damage 0-1, 1 = dead

EAST setFriend [WEST, 1] would make all EAST units friendly so it's better to use setcaptive for a single unit

unit_AI will be the name you give the AI in the editor.

Edited by F2k Sel

Share this post


Link to post
Share on other sites

Great ! THANK YOU!

But:

If he´s in captive state, he won´t obey my commands, I cannot let him walk (e.g. to exfil-chopper)

my warlord (unit_AI) just stands there and won´t move.

Any suggestions how to fix it?

I thought of a second trigger, with something like this:

Condition:

Team1 distance Warlord <3

Activation:

???

warlord setcaptive false; warlord action ["Talk", Team1];

I tried around with some commands, but the command "warlord setcaptive false;" at the end of the activation field

wont make him commandable to me?

Or he is fleeing... waaaah!

Edited by Purzel

Share this post


Link to post
Share on other sites

Story/Situation:

Team Bravo should get Warlord, he will flee, if shots in his closer range are fired.

So team "Bravo" will be forced to shoot him, but let him alive!

After that, he should stand still, surrender and is intergrated into team "Bravo", so the leader and its team has to get close to him, and the leader of "Bravo" can send him into an extraction chopper.

When "Warlord" arrives in base the mission should end.

What I´ve got until now:

Trigger 1:

Condition:

(damage Warlord)>0.1

On Activation:

removeallweapons Warlord ;[Warlord] JoinSilent Bravo; Warlord action ["surrender"];

---- > makes the warlord surrender and join to team "Bravo". I can see him as Member No.8, but cannot give him orders like "get in chopper"...

So i decided to create a new trigger and try around:

Trigger2:

Condition:

(leader Bravo) distance Attarim <3

On Activation:

Attarim setcaptive false; 1 setRadioMsg "Alpha Radio"; hint " You can now call a chopper for extraction.";

But it seems as if "Warlord" once is in "surrender-mode", he is uncontrollable...

I dont know how to fix it.

Greetings Purzel

Share this post


Link to post
Share on other sites

I would try removing the "surrender" action as everything before that should definitely work. Plus according to the documentation for surrender you have it wrong but I'm not sure it will make a difference anyway.

Share this post


Link to post
Share on other sites

In A2/OA it works as is but yes in A3 it gets stuck in animation.

It's the same with playmove, there seems to be no way to break it out of the animation.

player playActionNow "surrender";

use that and your also stuck in surrender mode.

http://feedback.arma3.com/view.php?id=5926

Edited by F2k Sel

Share this post


Link to post
Share on other sites

Thanks!

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  

×