Home   Help Search Login Register  

Author Topic: condition confusion  (Read 1519 times)

0 Members and 1 Guest are viewing this topic.

gadolinite

  • Guest
condition confusion
« on: 20 Jul 2003, 02:45:45 »
I have a squad of 12 enemy guys.  I want to trigger the end of the mission if all the guys are dead or if one or more of them is fleeing.

For example, you shoot all but one of the guys, and that last living guy starts to flee.  For example, you shoot all but three of the guys and they start to flee.  The trigger should be set up to check whether guys are fleeing (any of the 12 enemies) or if they are dead.

I already have the trigger set up to trigger the end when they are all dead.  The problem is, you can't kill them when one or more of them starts fleeing.  I have an idea on what to do, can someone streigten me out???\

Thank you

Kaliyuga

  • Guest
Re:condition confusion
« Reply #1 on: 20 Jul 2003, 03:37:56 »
  I may be missing something here....  but it would seem to me that simply putting a 'not present' trigger would cover both of these conditions you've mentioned.....

  If they're dead.. they're not present.. and if they've ran away they're obviously not present in the trigger area as well....


  you can of course play around with the allowfleeing command as well
  on those guys to make them all run away after a certain condition has  been met .. or not allow them the option of fleeing at all



deaddog

  • Guest
Re:condition confusion
« Reply #2 on: 20 Jul 2003, 03:42:48 »
You could also try the "fleeing" function:

fleeing unit
Operand types:
    unit: Object
Type of returned value:
    Boolean
Description:
    Check if unit is fleeing. Dead or empty unit returns false.

Example:
    fleeing eastReconGroup


Maybe try something like this:

"fleeing _x" count (units enemygroup) > 0

I've never tried that before but I see no reason why it wouldn't work, after all, "alive _x" count .......  works with no problems.

gadolinite

  • Guest
Re:condition confusion
« Reply #3 on: 20 Jul 2003, 06:39:09 »
if you do the > operator, for the alive part, the objective simply gets marked off only if one guy dies.

All I need to know how to do is incorperate a condition that will set off a trigger where all the guys in the group are dead or fleeing (can be one or the other).  

There are 12 guys in the group.  

All of them either have to be dead or fleeing for the trigger to go off.
« Last Edit: 20 Jul 2003, 06:40:10 by gadolinite »

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:condition confusion
« Reply #4 on: 20 Jul 2003, 06:57:45 »
("alive _X" count units enemygroup) == ("fleeing _X" count units enemygroup)

tel me if its workin ;)

LCD OUT
« Last Edit: 20 Jul 2003, 15:28:56 by LCD »
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

gadolinite

  • Guest
Re:condition confusion
« Reply #5 on: 20 Jul 2003, 07:02:35 »
I will try it out tommarow, i will let you know then

gadolinite out

deaddog

  • Guest
Re:condition confusion
« Reply #6 on: 20 Jul 2003, 15:02:29 »
Hey LCD,

I see a small problem with that.  For example, (count units enemygroup) will return only the count of the guys that are alive.  So if 8 are dead and the other 4 r fleeing, then :

8 + 4 == 4

Try this way instead:

("alive _X" count units enemygroup) == ("fleeing _X" count units enemygroup))


Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:condition confusion
« Reply #7 on: 20 Jul 2003, 15:29:55 »
wat ? didnt made ny erors :moon: :booty: ::)

::)

btw u have 1 syntax eror ;) :P minor 1 ;D

u got extra ) in da end ;D :P

LCD OUT
« Last Edit: 20 Jul 2003, 15:30:10 by LCD »
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

deaddog

  • Guest
Re:condition confusion
« Reply #8 on: 20 Jul 2003, 15:59:07 »
Quote
wat ? didnt made ny erors

You're right. What was I thinking, lol  ;D ;D :booty:

gadolinite

  • Guest
Re:condition confusion
« Reply #9 on: 22 Jul 2003, 23:51:36 »
("alive _X" count units enemygroup) == ("fleeing _X" count units enemygroup)

This syntax just sets off the trigger when the fleeing people is equal to the dead people.  I need an appropiate situation for this, because obviously this situation does not fit the purpose's situation.  

To win you are supposed to kill an enemy platoon of twelve guys.  

 :'(You can't win always, because the last guy alive (or perhaps the last few guys) in the squad runs away into ether, so you can't kill him\them.  

 ???How do you prevent this situation?

 8)Thank You:toocool:

Kaliyuga

  • Guest
Re:condition confusion
« Reply #10 on: 23 Jul 2003, 00:13:09 »
you can of course play around with the allowfleeing command as well on those guys to make them all run away after a certain condition has  been met .. or not allow them the option of fleeing at all


If you're having that much trouble with all of this still... why don't you just not allow the enemies to flee the area?

this allowfleeing 0

simple... no muss.. no fuss...  no headaches...  ;)

just make em crazy S.O.B's  that have no intention of turning tail and running no matter the odds  ;D      

You could just type LCD as the name of the unit  and get the same effect perhaps?  ;D


P.S.   quoting yourself rocks ;)

and don't forget to bring a towel

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:condition confusion
« Reply #11 on: 23 Jul 2003, 00:59:35 »
Quote
This syntax just sets off the trigger when the fleeing people is equal to the dead people.  I need an appropiate situation for this, because obviously this situation does not fit the purpose's situation.  

it sets off wen fleeing ppl equals alive ppl - not dead ppl - so it meens dat all da alive r fleeing so dats wat u want

Quote
I want to trigger the end of the mission if all the guys are dead or if one or more of them is fleeing.

or at least how it shud work ;)

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

gadolinite

  • Guest
Re:condition confusion
« Reply #12 on: 23 Jul 2003, 01:53:45 »
still, the trigger goes off too soon for my situation.  

deaddog

  • Guest
Re:condition confusion
« Reply #13 on: 23 Jul 2003, 03:10:53 »
First you say this:
Quote
I want to trigger the end of the mission if all the guys are dead or if one or more of them is fleeing.

Then you say this:

Quote
All I need to know how to do is incorperate a condition that will set off a trigger where all the guys in the group are dead or fleeing (can be one or the other).  


Which is it?  All fleeing or one or more fleeing?

Try this:

(("alive _X" count units enemygroup) == ("fleeing _X" count units enemygroup)) or ("alive _X" count units enemygroup) == 0

This should trigger if all of the living guys are fleeing OR if they are all dead.


Maybe the "fleeing _x" thing doesn't work.  Do a little debugging.  Add another trigger:

condition:  "fleeing _x" count units enemygroup > 0
on activate:  hint format ["Fleeing=%1","fleeing _x" count units enemygroup]



gadolinite

  • Guest
Re:condition confusion
« Reply #14 on: 23 Jul 2003, 18:53:40 »
forget all this scientific stuff, a simpler solution would be to set up a trigger activated by east to trigger the same ending.

So therefore you have 2 triggers, one testing for if all the guys are dead, and another in the area where they will flee.  Once one orm more of the
soldiers runs away, it will trigger that same end.  Both the triggers will do the same thing.

I will test this, if it works, then topic solved.