B@nditbe 0 Posted April 17, 2004 Hi all, in my mission on Dr.No i have a slight problem, because teams are kinda coming every were on that small island and that way trigger off almost all triggers i need to now how to prevent players to trigger off the outro script when not needed. So actually the outro should ONLY start when all players from WEST and RES are in the chopper Players are  from p1 till p12 Is there a line i could put in the activation field that checks if all players are in "chopper" ? And what if certain peeps are dead? Will the outro not start if it has counted players in the chopper but is missing the dead ones ? Thanks... Share this post Link to post Share on other sites
B@nditbe 0 Posted April 17, 2004 Well, i figured out this works : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">count crew chopper1 == (("alive _x") count units team1) But problem is, i have 3 teams of 4 men, and 1 of that teams is RES Share this post Link to post Share on other sites
Rastavovich 0 Posted April 17, 2004 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _ar = [p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12] _i = 0 _c = true #l   ?!alive _ar select _i: _ar - [_ar select _i]   ?!(_ar select _i in chopper) : _c = false   ?_i < 11 : _i = _i + 1, goto "l"   ?_c : calltheoutro,exit   ~5   _c = true   _i = 0   goto "l" might work as surveillance script. Here the script checks every 5 seconds if all man are in the chopper, and takes out killed men. There might be an easier way... but I just got up;). Share this post Link to post Share on other sites
B@nditbe 0 Posted April 17, 2004 Nice But forgive me beeing noobish in scripting, but how would it be by just checking if theyre in chopper, not calling the outro, i do that by another trigger. would it only the part : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_ar = [p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12] _i = 0 _c = true #l ?!alive _ar select _i: _ar - [_ar select _i] ?!(_ar select _i in chopper) : _c = false ?_i < 11 : _i = _i + 1, goto "l" Thx in advance Share this post Link to post Share on other sites
Rastavovich 0 Posted April 17, 2004 Instead of calling the outro directly you would set a variable, which the outrotrigger checks for. Ie: instead of calltheoutro you set a variable: Calloutro = true, publicvariable "Calloutro" (publicvariable might be needed in mp games) and the trigger that starts the outro has condition: Calloutro of course if you can add more conditions to the outrotrigger, so it doesn't allways start when all ppl are in the chopper, ie missionstart (but make sure then that the variable isnt set true on start and stays there even without the ppl in the chopper). Share this post Link to post Share on other sites
B@nditbe 0 Posted April 17, 2004 no go, doesnt work tryed several ways Share this post Link to post Share on other sites
Rastavovich 0 Posted April 17, 2004 how do you call the script? what is the trigger condition? Share this post Link to post Share on other sites
B@nditbe 0 Posted April 17, 2004 Ok, this is what i've tryed : I first made a script called "onboardcheck.sqs" in my missionfolder. Per information, P1 --> P4 is team1, P5 --> p8 is team2, p9 --> p12 is team3. Team1 and 2 are West, Team3 is Resistance. onboardcheck.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_ar = [p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12] _i = 0 _c = true #l   ?!alive _ar select _i: _ar - [_ar select _i]   ?!(_ar select _i in chopper) : _c = false   ?_i < 11 : _i = _i + 1, goto "l"   ?_c : OBJ_4,exit   ~5   _c = true   _i = 0   goto "l" Then in the mission i created a trigger within the activation field : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[] exec "onboardcheck.sqs"; This trigger will go off by the presents of anybody that enters that area. I made a second trigger with condition : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">OBJ_4 in the activation field i put : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">OutroWin = true; Third trigger contains in condition : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">OutroWin and in activation field : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[] exec "OutroWin.sqs"; Hope this helps abit to find a solution Idea is that the script checks if all alive players from the 3 teams are in the evac chopper that flies back to base, if they all are outro should start. Greetz... Share this post Link to post Share on other sites
B@nditbe 0 Posted April 17, 2004 Nobody knows a simple solution or simple code to check if all teams are in chopper ? Share this post Link to post Share on other sites
MrZig 0 Posted April 17, 2004 It's wrong, it has to be <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">?_c : OBJ_4 = true;exit Share this post Link to post Share on other sites
ni-mh 0 Posted May 13, 2004 to expand on the topic, how do i detect if a unit is in any vehicle at all? i'm editing a bleeding script that i want to stop while the unit is in a vehicle. im a complete scripting newb, so be nice Share this post Link to post Share on other sites
korax 4 Posted May 13, 2004 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">? _player in _vehicle : playerinvehicle = true As simple as it gets  edit: ah yeah, you meant ANY vehicle.. then mrzig's suggestion works Share this post Link to post Share on other sites
MrZig 0 Posted May 13, 2004 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">?vehicle player != player : _player_in_vcl = true Share this post Link to post Share on other sites
ni-mh 0 Posted May 13, 2004 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">?vehicle player != player : _player_in_vcl = true let me clarify, so this will work with any vehicle? as in the person can get into any vehicle, with or without a name, and this will be activated? Share this post Link to post Share on other sites
ni-mh 0 Posted May 13, 2004 I believe so. ok, ill give it a try thx  also thx Korax for the fast reply Share this post Link to post Share on other sites
Hit_Sqd_Day 0 Posted May 13, 2004 Hi everybody, i am at work so there might be a slight mistake, but try. {_X countin Vehiclename} foreach units Groupname that would be the condition. Hope it helps. Have a good one. Day Share this post Link to post Share on other sites