Home   Help Search Login Register  

Author Topic: Abort a countdown if detecting unit is killed  (Read 1433 times)

0 Members and 1 Guest are viewing this topic.

Olle Stolpe

  • Guest
Abort a countdown if detecting unit is killed
« on: 24 Feb 2005, 13:43:41 »
Ok.. here's a problem.
I want a chopper to come in after a 20 seconds countdown, when a Unit on East has
detected a Unit on West.

The problem is that if the East Unit that detected the West Unit is killed within the 20 seconds
I want the countdown for the chopper to be aborted.

In other words.
If a East soldier spots a West soldier, he have to survive 20 seconds before he can send for the
chopper. If he is killed before the 20 seconds is run out, the chopper will not come.

Any ideas?
I think it would be really cool.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Abort a countdown if detecting unit is killed
« Reply #1 on: 24 Feb 2005, 13:49:15 »
Triggers have two time options.  One is TimeOut the ther is CountDown.  The default behaviour is that once triggered the event will happen.  The alternative is that if the condition that fires the trigger ceases to be true at any time during the wait period then the event does not happen and the trigger is re-set.

Have you looked at this as a way of doing what you want?

You could use thislist with the trigger to get the unit that has been detected.  I do not knwo how you can identify the unit that did the detecting.

Olle Stolpe

  • Guest
Re:Abort a countdown if detecting unit is killed
« Reply #2 on: 24 Feb 2005, 14:43:22 »
Thx.. the problem is that getting the unit that detected is the thing that's interesting here.

Offline ACF

  • Members
  • *
  • Llama?? Ain't that French for tanks?
Re:Abort a countdown if detecting unit is killed
« Reply #3 on: 24 Feb 2005, 14:55:26 »
Best bet might be a test with captive or unarmed units to see if a Repeatedly Detected By trigger stays active when some or all of the detecting side are killed.  If it changes state when a 'detector' is terminated then adding a 20s timeout should do what you want.

Olle Stolpe

  • Guest
Re:Abort a countdown if detecting unit is killed
« Reply #4 on: 25 Feb 2005, 01:30:40 »
It doesn't change when the detector is killed.
I put a russian on a field and had him spot me (as west).
I shot him before 20 secinds passed.. But after the time the trigger was started.

I had it set to Timeout and tried Countdown aswell.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Abort a countdown if detecting unit is killed
« Reply #5 on: 25 Feb 2005, 01:35:07 »
I suspect a re-think of what you are trying to do is in order here.

Olle Stolpe

  • Guest
Re:Abort a countdown if detecting unit is killed
« Reply #6 on: 25 Feb 2005, 09:41:07 »
no.. in this game it ought to be possible..

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Abort a countdown if detecting unit is killed
« Reply #7 on: 25 Feb 2005, 11:38:58 »
This is much more complicated than you have described, and that is partly what is causing the difficulty.     For a start you have not mentioned all the logical possibilities, or perhaps you just haven't given us all the information.

First of all, is there just one East loon or several?    How big is the trigger area?    If a second East loon spots a West loon before the chopper has been called, what happens then?    What if he spots after the chopper has been called?    Are these loons in one group or several?    And so on.

However, there are at least two basic problems.    

a) How to grab the East loon who did the spotting

b) How to control the chopper


Let's do b) first.    
1) Chopper on hold waypoint

2)  West detected by East trigger fires.   The trigger is type switch and synchroed to the hold waypoint.   The chopper moves immediately to his next waypoint, which is a move waypoint adjacent to the hold waypoint and has a delay of 15-20s (you'll have to experiment)

3) Chopper completes move waypoint and moves to its next waypoint, which is also a move waypoint and at the place that you want the chopper to go.

4)  The chopper has, further down its waypoint sequence, the waypoints you want it to follow if the detecting loon is killed.    If the loon is killed a switch trigger is fired and the chopper goes directly to that part of the waypoint sequence.   Using repeating switch triggers and variables you can make a unit go to any part of its waypoint sequence as many times as you like.    This is one of the great strengths of the ofp mission design engine and is much underappreciated and underused.     Never use a script when triggers and waypoints can do the job.

Now, turning to a).   As a general principle, grabbing the detecting loon out of several is not easy.    In fact I have no idea how you might do it, not least because as soon as one loon detects an enemy  he shares that information with the rest of his group.  

If there is only one east loon then grabbing him is easy - just name him and we're done.   If there is more than one then you need to decide what you want to happen.   At the moment I'm not convinced that you are really clear in your own mind.
Plenty of reviewed ArmA missions for you to play

Olle Stolpe

  • Guest
Re:Abort a countdown if detecting unit is killed
« Reply #8 on: 25 Feb 2005, 12:03:49 »
I am very clear thank you...

Thank for the tips but the chopper is no problem.

The scenario is this.

It's a city full of East, when anyone of them spots a West a trigger is started and
after 20 seconds a chopper starts patroling the city.

I want the countdown to be interupted when all that knows about the west units (within
the range of the trigger, which is the entire city) is killed.

For example:

If one East unit spots a West, and he is killed within 20 seconds, the chopper will not
come.

If a group of East Units knows about a West unit, then the entire group must be eliminated within the 20 seconds.

Got it?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Abort a countdown if detecting unit is killed
« Reply #9 on: 25 Feb 2005, 15:13:19 »
Yes.   :thumbsup:

In principle, the solution is now obvious but tricky and messy and I don't know exactly how to do it.    

Firstly, you need an array of the East units in the relevant area, and an array of the West units.    

Secondly, you need to read up on the knowsAbout (there is some good stuff kicking about the forums and the Ed Depot) command and decide what level is appropriate for your purposes.

Thirdly you need to take each East unit from the array in turn (or possibly only the group leaders) and check the knowsAbout value for every unit in the West array.     You'll need to repeat this check every second.     Depending on the result, you can make the appropriate consequence (if any) occur.

There might be an easier way.    Set your West detected by east trigger to Repeating, and make toggle the value of a variable as it fires and reactivates.     That might work, not sure.
Plenty of reviewed ArmA missions for you to play

Olle Stolpe

  • Guest
Re:Abort a countdown if detecting unit is killed
« Reply #10 on: 25 Feb 2005, 18:16:55 »
Thx.. I'll try it.

scooter24

  • Guest
Re:Abort a countdown if detecting unit is killed
« Reply #11 on: 26 Feb 2005, 20:59:32 »
Hey!
Why not try putting 'not (alive eastUnit) or (count units eastGroup1 == 0) AND (count units eastGroup2 == 0)' in the 'On Deactivation' field of a trigger and link it (via syncronisation) to the 'MOVE'/'LOAD' of the helocopter and that of the 'WEST detected by EAST' trigger?
     It's just an idea and might/will probibally be wrong. However, it's worth a go. Logically I can't see what could go wrong but you can rain down the explitives on me if it doesn't   :D!.
     You might also want to read up on 'SWITCH' triggers that can cancel loop waypoints, for example: 'SEARCH AND DESTROY'. An intelligent guess would dictate it should work for 'MOVE' waypoints too. Good luck!
scooter24
« Last Edit: 26 Feb 2005, 21:03:14 by scooter24 »