Home   Help Search Login Register  

Author Topic: "Attacked" script needed  (Read 2043 times)

0 Members and 1 Guest are viewing this topic.

Offline DjTano

  • Members
  • *
"Attacked" script needed
« 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?

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: "Attacked" script needed
« Reply #1 on: 22 Jun 2007, 17:14:00 »
you may check the behaviour of group leader
condition:
Code: [Select]
behaviour leader mygroup == "COMBAT"

Offline DjTano

  • Members
  • *
Re: "Attacked" script needed
« Reply #2 on: 22 Jun 2007, 17:22:56 »
huh, wht do you mean?

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: "Attacked" script needed
« Reply #3 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:

Offline DjTano

  • Members
  • *
Re: "Attacked" script needed
« Reply #4 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

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: "Attacked" script needed
« Reply #5 on: 22 Jun 2007, 19:49:18 »
Did you not understand the solution supplied by Mandoble?


Planck
I know a little about a lot, and a lot about a little.

Offline Cheetah

  • Former Staff
  • ****
Re: "Attacked" script needed
« Reply #6 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.
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

Offline DjTano

  • Members
  • *
Re: "Attacked" script needed
« Reply #7 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...

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: "Attacked" script needed
« Reply #8 on: 23 Jun 2007, 03:31:31 »
In the leader?
In the condition of your trigger.

Offline DjTano

  • Members
  • *
Re: "Attacked" script needed
« Reply #9 on: 23 Jun 2007, 03:35:52 »
yea i got it to work, sry for the hassle