No announcement yet.

MP TvT Tickets forConquest

  • Filter
  • Time
  • Show
Clear All
new posts

  • MP TvT Tickets forConquest

    I'll edit this for use but pretty happy to share ahead of time:

    // *************configurable values to set below here
    _ticketLimit = 100; //set this for the # of respawn tickets for each team
    // ***************************************************************
    // ******************************** set initial counters and announce that this ticket script running to all clients
    observer globalChat format ["Repsawn ticket system is running on the server. Your team has %1 tickets.", _ticketLimit];
    if (isServer) then
    	[west, _ticketLimit] call BIS_fnc_respawnTickets;
    	[east, _ticketLimit] call BIS_fnc_respawnTickets;
    	// loop will also broadcast the tickets score to all players
    	// loop will also trigger mission end when tickets expire for either side
    	// loop will check for players in the other sides capture zone and decrease their tickets accordingly
    	_run = true;
    	player sideChat "This is the server";
    	while {_run} do
    		//player sideChat "Loop is running";
    		//get current scores
    		_westScore = [west] call BIS_fnc_respawnTickets;
    		_eastScore = [east] call BIS_fnc_respawnTickets;
    		//player groupChat format ["West: %1 ---- East: %2",_westScore, _eastScore];
    		//broadcast scores
    		[[format ["West: %1 --- East: %2",_westScore,_eastScore]], "TG_fnc_globalHint", true, true] spawn BIS_fnc_MP;
    		//check for expired tickets to end mission ** THESE VARIABLES TRIGGER MISSION COMPLETION USING TRIGGERS IN THE MISSION **
    		if (_westScore < 1) then
    			missionState = "opforWon";
    			publicVariable "missionState";
    			_run = false;
    		if (_eastScore < 1) then
    			missionState = "bluforWon";
    			publicVariable "missionState";
    			_run = false;
    		//decrease tickets for each player that is in the enemy zone
    		_bluZonePlayers = [];
    		_opZonePlayers = [];
    		_bluZonePlayers = list trigBluZone;
    		_opZonePlayers = list trigOpZone;
    		[west, 0 - (count _bluZonePlayers)] call BIS_fnc_respawnTickets;
    		[east, 0 - (count _opZonePlayers)] call BIS_fnc_respawnTickets;
    		//sleep to save resources and slow the counter
    		sleep 5;
    Big thanks to Chichco for helping me through the debugging!
    |TG-189th| Unkl
    TG PrimerArmA Game Officer189th Infantry Brigade Former Irregular
    Submit a Ribbon Nomination!
    "this is on par with groups you have to join to get the quality of gameplay and i really enjoyed it" - random dude
    "Remember when the threat has spotted you, smoke first then bring the explosive rounds to bear. When the threat has not spotted you its bang first and smoke after to extract." - Wicks



TeamSpeak 3 Server




Twitter Feed