OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: DjTano on 22 Jun 2007, 17:00:34

Title: "Attacked" script needed
Post by: DjTano on 22 Jun 2007, 17:00:34
Hey guys,

i would like to set a trigger that is activated if a group of soldiers is attacked (they dont need to be killed to activate it), how do i do that?
Title: Re: "Attacked" script needed
Post by: Mandoble on 22 Jun 2007, 17:14:00
you may check the behaviour of group leader
condition:
Code: [Select]
behaviour leader mygroup == "COMBAT"
Title: Re: "Attacked" script needed
Post by: DjTano on 22 Jun 2007, 17:22:56
huh, wht do you mean?
Title: Re: "Attacked" script needed
Post by: bedges on 22 Jun 2007, 18:47:28
all units have attributes, such as skill, or weapons, or side, or face, etc. these attributes can be set, and they can also be detected.

one of those attributes is behaviour, another is combatmode. you can look both of these up in the comref.

i also suggest you take a look through the faq, because a lot of the questions you've been asking recently have answers in there.  :good:
Title: Re: "Attacked" script needed
Post by: DjTano on 22 Jun 2007, 19:31:55
nono, i want it this way:

i attack an enemy squad (no need to kill them)
that activates a trigger
Title: Re: "Attacked" script needed
Post by: Planck on 22 Jun 2007, 19:49:18
Did you not understand the solution supplied by Mandoble?


Planck
Title: Re: "Attacked" script needed
Post by: Cheetah on 22 Jun 2007, 23:22:16
A group switches to COMBAT behaviour once engaged. So if they start in either SAFE, AWARE or STEALH you can detect when they enter combat.
Title: Re: "Attacked" script needed
Post by: DjTano on 23 Jun 2007, 03:24:53
ok, so i put "behaviour leader mygroup == "COMBAT"" in the leader, and wht would tht help?

i want this:

if this unit is engaged then trigger is activated

your solution seems to just put my unit in combat mode...

WAAAAAAAAAAAAAAAIT

maybe i understood now, ill go try it out...
Title: Re: "Attacked" script needed
Post by: Mandoble on 23 Jun 2007, 03:31:31
In the leader?
In the condition of your trigger.
Title: Re: "Attacked" script needed
Post by: DjTano on 23 Jun 2007, 03:35:52
yea i got it to work, sry for the hassle