RAMBO 0 Posted June 18, 2002 I need to know a simple thing which cannot come up to my mind. How can I activate a trigger when 2 vehicles get in a trigger area. THANKS. Share this post Link to post Share on other sites
RED 0 Posted June 18, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">!(unit1 in thislist) AND !(unit2 in thislist)<span id='postcolor'> That should work. If not use this: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">unit1 in thislist AND unit2 in thislist<span id='postcolor'> I have just herd that using the first example may be quicker. RED Share this post Link to post Share on other sites
RAMBO 0 Posted June 18, 2002 Thanks for your help m8 I'll try it and tell you how did it go. Share this post Link to post Share on other sites
RAMBO 0 Posted June 19, 2002 its me again. What should the activation of the TRIGGER be? Share this post Link to post Share on other sites
JAP 2 Posted June 19, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (RAMBO @ June 19 2002,09:39)</td></tr><tr><td id="QUOTE">its me again. What should the activation of the TRIGGER be?<span id='postcolor'> the side of the units that must activate it, or nothing at all, your choice Share this post Link to post Share on other sites
RAMBO 0 Posted June 19, 2002 Well thanks, that did work perfectly. Share this post Link to post Share on other sites
Chris Death 0 Posted June 19, 2002 Hi Rambo, just wanna add some info in here for your better understanding of those condition fields in triggers. By default, the setting in a trigger's condition field is: THIS What does it mean? - Well it means the trigger becomes active, as soon as the activation settings above the condition field are true. This could be: West present, or East not present, countdown, etc. However, if you want to get in use of the trigger's activation settings, you need a condition: THIS OK, then we have the condition: TRUE True means, the required condition of this trigger will be true as soon as the mission starts. The trigger gets activated when the mission starts (such triggers are often used as initialization triggers, or to play music, text-messages etc.) You can use a variable instead of TRUE, and start the mission, by setting this variable to false. Usually, a variable (not numeric) is FALSE at mission start. You can use another trigger, waypoint, script to set this variable to TRUE. Example: trigger A - condition field: gogo :note - gogo is a variable, and the trigger expects this variable to be true, so that it gets activated. 1 AI unit with 2 waypoints, or more/less (at least one wp) into any waypoint's activation field, you type: gogo=true Once the unit has reached the waypoint with gogo=true, trigger A gets activated. Also you can mix conditions together, by using the AND statement. For example: You want a trigger to wait for a specific side (let's say WEST) inside it's area, and the variable gogo should be true aswell. trigger A - activation: West/present condition field: this AND gogo :note - this expects the settings West/present to be filled, while gogo you've seen above, how to make it true. Also you can use numeric variables to activate triggers (this way, you can use a variable multiple times in a mission). Let's say we want to have 3 triggers, and we let them get activated by the same variable, but with different conditions. trigger A - condition field: gogo == 1 trigger B - condition field: gogo == 2 trigger C - condition field: gogo == 3 trigger D - condition field: true activation field: gogo=0 :note this initializes the variable gogo as a numeric variable with a value of 0 - usually numeric variables will start with a value of 0, but this is the clean way, how it should be done. Now create a unit, + 3 waypoints. In the 1st waypoints activation field: gogo=1 or: gogo=gogo+1 :note - if you use: gogo=1, you do the value change hardcoded, this means you don't care, what value the variable actually owns, you just set it to 1 While using gogo=gogo+1 let you be more creative, because you could use always the same command (probably the same trigger), to increase the value of the variable gogo. If gogo is actually at the value 0, and you say gogo=gogo+1, it will increase to the value 1. If gogo is 1, and you use the same command, it will increase to 2. :hint - you could use a patrol, walking a cycle, and everytime it passes the 2nd waypoint, you could say: gogo=gogo+1 !! Only one thing, to take care of: don't mix numeric and boolean variables (boolean is the name of the TRUE/FALSE variables). What i mean is, don't use the same variable with a value and with a true/false in the same mission. This will only cause some generic error in expression, or whatever error message. hope it wasn't to confusing and it makes some light into darkness ~S~ CD Share this post Link to post Share on other sites
RAMBO 0 Posted June 20, 2002 DAMN thanks m8 I knew some things of that , but U made things much more clearer now for me You were of GREAT HELP do U use ICQ or MSN? tnx again Share this post Link to post Share on other sites
Chris Death 0 Posted June 20, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">do U use ICQ or MSN?<span id='postcolor'> All visible if you click on my profile ~S~ CD Share this post Link to post Share on other sites
RedRaider 0 Posted September 19, 2002 Greetings all... How can I set a trigger to fire when all units of a group (the player group) are within the trigger radius? In other words, the trigger must not fire unless all group members are within the radius. It should be noted that although there can be up to 6 members in my group (West1, West2, ......, West6), the trigger still needs to fire if for example there are only 3 players and the remaining 3 units (West4 thru West6) have been disabled (by disabling AI). Any help is greatly appreciated. Kind Regards, RedRaider Share this post Link to post Share on other sites
Chris Death 0 Posted September 19, 2002 Soso, you're talking about multiplayer. OK, excepting you have a whole playable squad, you can never get sure, that the group leader won't be disabled from the lobby aswell. So everything you want to use out of his init-field, or grouping (F2) to a trigger could become useless. My first hint is then: Create a trigger with an area, covering the whole squad (only that squad). Activation: side of your squad/present/once condition: this onactivation: myleader = this select 0; mygroup = group myleader Then create another trigger (the one you were asking for); activation: anybody/present condition: this AND "_x in thislist" count (units mygroup) == count (units mygroup) This trigger will only become activated, once the whole team is inside the trigger's area. ~S~ CD Share this post Link to post Share on other sites