febriannas 10 Posted September 26, 2014 i want to make a trigger that act on CONDITION of the total ticket left. ex: if blufor ticket left is 5 than spawn a tank so what is the condition to call the total ticket? Share this post Link to post Share on other sites
iceman77 19 Posted September 26, 2014 (edited) I haven't tinkered with tickets, but apparently bis_fnc_respawnTickets returns a number and an array: NUMBER - remaining tickets after adjustment (-1 when no tickets were defined yet) ARRAY - when array was used as an argument, returned value is [<losingSpace>,<tickets>] condition: (ticketHandle select 0) == 5 Activation: _script = [arguments] execVM "tankSpawn.sqf"; Edited September 27, 2014 by Iceman77 Share this post Link to post Share on other sites
febriannas 10 Posted September 26, 2014 wow thank you iceman for the response, one more question (ticketHandle select 0) == 5 for the condition so what is the (ticketHandle select 0) zero stands for? Share this post Link to post Share on other sites
iceman77 19 Posted September 26, 2014 remaining tickets after adjustment Share this post Link to post Share on other sites
febriannas 10 Posted September 26, 2014 (edited) and for the sides condition of the ticket like "west or east", where we put it? or just sync it? Edited September 26, 2014 by febriannas Share this post Link to post Share on other sites
MulleDK19 21 Posted September 27, 2014 (ticketHandle select 0) == 5 Should be <= 5, though, as triggers only tick every 0.5 seconds, so if tickets are 6, and 2 are lost at the same time, next check will be 4, and the trigger will never activate. Share this post Link to post Share on other sites
iceman77 19 Posted September 27, 2014 Yup. Good spot. Share this post Link to post Share on other sites
febriannas 10 Posted September 27, 2014 what is it mean? so.. (ticketHandle select 0) == 5 shouldbe (ticketHandle select 0) <= 5 and for checking th side ticket where do we put the west or east? Share this post Link to post Share on other sites
iceman77 19 Posted September 27, 2014 what is it mean?so.. (ticketHandle select 0) == 5 shouldbe (ticketHandle select 0) <= 5 Yes, incase the score is never actually equal to 5. So we want to check if it's 5 or less. Use == sparingly when checking values. Share this post Link to post Share on other sites
febriannas 10 Posted September 27, 2014 (edited) so for the effecting trigger side ticket? where do we put it west or east? if sync where to sync, to the ticket module? or to the game logic module? or maybe setting trigger activation BLUFOR? Edited September 27, 2014 by febriannas Share this post Link to post Share on other sites
iceman77 19 Posted September 27, 2014 (edited) Okay I had to set up my own little scenario in order to provide a legit answer. I had my head on backwards there for a minute lol. Trigger + module Method (assuming you've the module setup) trigger condition: [west,0] call BIS_fnc_respawnTickets <= 5 External Script Method (no module or triggers) init.sqf. [] spawn { //Starting tickets [west,50] call BIS_fnc_respawnTickets; //Monitor tickets while {[west,0] call BIS_fnc_respawnTickets >= 5} do { sleep 1; if ([west,0] call BIS_fnc_respawnTickets <= 5 && {isNil "wTankSpawned"}) then { _wTank = "B_MBT_01_TUSK_F" createVehicle (getPosATL wBasePos); wTankSpawned = 1; }; }; }; Edited September 27, 2014 by Iceman77 Share this post Link to post Share on other sites
febriannas 10 Posted September 27, 2014 (edited) WOWOWOWOOW, SORRY the [west,0] call BIS_fnc_respawnTickets <= 5 and [east,0] call BIS_fnc_respawnTickets <= 5 its WORKINGG!! it workk ahh iceman i think i start to loving u, always there to help me out. 3 lol please dont get bored to always help me and the others. once again thank you dude Edited September 27, 2014 by febriannas Share this post Link to post Share on other sites