HazJ 1289 Posted September 14, 2018 Done. Check PM for mission. There was a bit on confusion from the start which could of been avoided by using more detailed info. A bit of fault on both end but alll good heh. // initServer.sqf sleep 2; // needed // the sleep is lazy - it would be better to check if function/module has init // this will loop until condition is met then exit, allowing the code after it to run waitUntil { _bluforTickets = [blufor] call BIS_fnc_respawnTickets; _independentTickets = [independent] call BIS_fnc_respawnTickets; if (_bluforTickets < 1 || _independentTickets < 1) exitWith {true}; sleep 1; }; "missionEnded" call BIS_fnc_endMissionServer; You also had duplicate CfgDebriefing + brackets {} in description.ext which I removed. I have deleted the additional triggers in the Eden editor since they are no longer needed. I seem to have to capture two sectors before tickets deduct. Not sure if this is intended or not so I left it. 1 Share this post Link to post Share on other sites
jonesy_d 3 Posted September 14, 2018 15 minutes ago, HazJ said: Done. Check PM for mission. There was a bit on confusion from the start which could of been avoided by using more detailed info. A bit of fault on both end but alll good heh. // initServer.sqf sleep 2; // needed // the sleep is lazy - it would be better to check if function/module has init // this will loop until condition is met then exit, allowing the code after it to run waitUntil { _bluforTickets = [blufor] call BIS_fnc_respawnTickets; _independentTickets = [independent] call BIS_fnc_respawnTickets; if (_bluforTickets < 1 || _independentTickets < 1) exitWith {true}; sleep 1; }; "missionEnded" call BIS_fnc_endMissionServer; You also had duplicate CfgDebriefing + brackets {} in description.ext which I removed. I have deleted the additional triggers in the Eden editor since they are no longer needed. I seem to have to capture two sectors before tickets deduct. Not sure if this is intended or not so I left it. Yes the object is to capture two or more sector's and bleed the enemy out of tickets to win the match..also I did also manage to get it to work finally I had to ad another sector images as followed.. Added another sector and link blufor and independent to it... https://www.dropbox.com/s/lirq41ojegik2g4/Yoursidewon.jpg?dl=0 https://www.dropbox.com/s/6ndyoa1qx4m5qsp/ysw.jpg?dl=0 One problem is I have to capture each one in sequence..like 1,2,3 I wish to have captures on random..but for now I am seeing the light..I will look over what you sent back to me..and examine it carefully... Share this post Link to post Share on other sites
Larrow 2820 Posted September 14, 2018 There is a scripted EH for tickets. Not on my main PC, so untested but something like... //initServer.sqf [ independent, 10 ] call BIS_fnc_respawnTickets; [ west, 10 ] call BIS_fnc_respawnTickets; [ missionNamespace, "respawnTicketsExhausted", { params[ "_losingSide" ]; _winningSide = ( [ independent, west ] - [ _losingSide ] ) select 0; [ "End1", true, true ] remoteExec [ "BIS_fnc_endMission", _winningSide ]; [ "Loser", false, true ] remoteExec [ "BIS_fnc_endMission", _losingSide ]; if ( isDedicated ) then { _nul = [] spawn { sleep 10; endMission "End1"; }; }; }] call BIS_fnc_addScriptedEventHandler; 3 Share this post Link to post Share on other sites
HazJ 1289 Posted September 14, 2018 Even better. Was not aware. Share this post Link to post Share on other sites
jonesy_d 3 Posted September 14, 2018 6 hours ago, Larrow said: There is a scripted EH for tickets. Not on my main PC, so untested but something like... //initServer.sqf [ independent, 10 ] call BIS_fnc_respawnTickets; [ west, 10 ] call BIS_fnc_respawnTickets; [ missionNamespace, "respawnTicketsExhausted", { params[ "_losingSide" ]; _winningSide = ( [ independent, west ] - [ _losingSide ] ) select 0; [ "End1", true, true ] remoteExec [ "BIS_fnc_endMission", _winningSide ]; [ "Loser", false, true ] remoteExec [ "BIS_fnc_endMission", _losingSide ]; if ( isDedicated ) then { _nul = [] spawn { sleep 10; endMission "End1"; }; }; }] call BIS_fnc_addScriptedEventHandler; Thanks...we have it sorted out already..but every little bit help..your input with this example gives me idea's to see if they can be done..for example..gonna try to see, if respawn can work this.. Players can't respawn unless Squad Leader is alive and at least one Sector is active for their side..so either spawn on Squad Leader or active Sector...this makes the match much harder..also once all players have started they can not use the orginal spawn point..it deactivates..so leaves just spawning on Squad Leader or Sector gonna work on this later this morning.. Share this post Link to post Share on other sites
jonesy_d 3 Posted September 14, 2018 9 hours ago, Larrow said: There is a scripted EH for tickets. Not on my main PC, so untested but something like... //initServer.sqf [ independent, 10 ] call BIS_fnc_respawnTickets; [ west, 10 ] call BIS_fnc_respawnTickets; [ missionNamespace, "respawnTicketsExhausted", { params[ "_losingSide" ]; _winningSide = ( [ independent, west ] - [ _losingSide ] ) select 0; [ "End1", true, true ] remoteExec [ "BIS_fnc_endMission", _winningSide ]; [ "Loser", false, true ] remoteExec [ "BIS_fnc_endMission", _losingSide ]; if ( isDedicated ) then { _nul = [] spawn { sleep 10; endMission "End1"; }; }; }] call BIS_fnc_addScriptedEventHandler; Well, tried this game runs but at the end lots of line errors..hmmm... Share this post Link to post Share on other sites
Larrow 2820 Posted September 14, 2018 3 hours ago, jonesy_d said: Well, tried this game runs but at the end lots of line errors..hmmm... Sorry was going off of memory and thought the SEH provided the side that depleted its tickets, but it does not. Instead it provides the namespace of where the depleted tickets are kept. //initServer.sqf //Wait till after breifing screen waitUntil { time > 0 }; //Add sides tickets [ independent, 5 ] call BIS_fnc_respawnTickets; [ west, 5 ] call BIS_fnc_respawnTickets; //Add SEH for when a sides tickets are depleted [ missionNamespace, "respawnTicketsExhausted", { //Calculate Winner and Loser _sideScores = [ -1, [ west ] call BIS_fnc_respawnTickets, [ independent ] call BIS_fnc_respawnTickets ]; _losingSide = _sideScores findIf { _x isEqualTo 0 } call BIS_fnc_sideType; _winningSide = ( [ west, independent ] - [ _losingSide ] ) select 0; //End mission for all clients of SIDE with either win or lose ending screen [ "SideWon", true, true ] remoteExec [ "BIS_fnc_endMission", _winningSide ]; [ "SideLost", false, true ] remoteExec [ "BIS_fnc_endMission", _losingSide ]; //Remove this SEH [ missionNamespace, "respawnTicketsExhausted", _thisScriptedEventHandler ] call BIS_fnc_removeScriptedEventHandler; //If we are a dedicated server, so no client to receive above endMission's if ( isDedicated ) then { //End mission on server [] call BIS_fnc_endMission; }; }] call BIS_fnc_addScriptedEventHandler; TEST_MISSION auto depletes tickets for testing and includes example of custom debriefing section (4/4). 1 1 Share this post Link to post Share on other sites
jonesy_d 3 Posted September 14, 2018 (edited) Just now, Larrow said: Sorry was going off of memory and thought the SEH provided the side that depleted its tickets, but it does not. Instead it provides the namespace of where the depleted tickets are kept. //initServer.sqf //Wait till after breifing screen waitUntil { time > 0 }; //Add sides tickets [ independent, 5 ] call BIS_fnc_respawnTickets; [ west, 5 ] call BIS_fnc_respawnTickets; //Add SEH for when a sides tickets are depleted [ missionNamespace, "respawnTicketsExhausted", { //Calculate Winner and Loser _sideScores = [ -1, [ west ] call BIS_fnc_respawnTickets, [ independent ] call BIS_fnc_respawnTickets ]; _losingSide = _sideScores findIf { _x isEqualTo 0 } call BIS_fnc_sideType; _winningSide = ( [ west, independent ] - [ _losingSide ] ) select 0; //End mission for all clients of SIDE with either win or lose ending screen [ "SideWon", true, true ] remoteExec [ "BIS_fnc_endMission", _winningSide ]; [ "SideLost", false, true ] remoteExec [ "BIS_fnc_endMission", _losingSide ]; //Remove this SEH [ missionNamespace, "respawnTicketsExhausted", _thisScriptedEventHandler ] call BIS_fnc_removeScriptedEventHandler; //If we are a dedicated server, so no client to receive above endMission's if ( isDedicated ) then { //End mission on server [] call BIS_fnc_endMission; }; }] call BIS_fnc_addScriptedEventHandler; TEST_MISSION auto depletes tickets for testing and includes example of custom debriefing section (4/4). Thanks I will test it out and also look at the scripting so I could learn something out of it.. Here's a question: Is there a way that the original spawn point is disable and players can only spawn (Alive) Squad Leader and only spawn on active sectors(Blufor) or in this case (independent)??? What type of beer you like??? Edited September 14, 2018 by jonesy_d Beer Share this post Link to post Share on other sites
jonesy_d 3 Posted September 14, 2018 3 hours ago, Larrow said: Sorry was going off of memory and thought the SEH provided the side that depleted its tickets, but it does not. Instead it provides the namespace of where the depleted tickets are kept. //initServer.sqf //Wait till after breifing screen waitUntil { time > 0 }; //Add sides tickets [ independent, 5 ] call BIS_fnc_respawnTickets; [ west, 5 ] call BIS_fnc_respawnTickets; //Add SEH for when a sides tickets are depleted [ missionNamespace, "respawnTicketsExhausted", { //Calculate Winner and Loser _sideScores = [ -1, [ west ] call BIS_fnc_respawnTickets, [ independent ] call BIS_fnc_respawnTickets ]; _losingSide = _sideScores findIf { _x isEqualTo 0 } call BIS_fnc_sideType; _winningSide = ( [ west, independent ] - [ _losingSide ] ) select 0; //End mission for all clients of SIDE with either win or lose ending screen [ "SideWon", true, true ] remoteExec [ "BIS_fnc_endMission", _winningSide ]; [ "SideLost", false, true ] remoteExec [ "BIS_fnc_endMission", _losingSide ]; //Remove this SEH [ missionNamespace, "respawnTicketsExhausted", _thisScriptedEventHandler ] call BIS_fnc_removeScriptedEventHandler; //If we are a dedicated server, so no client to receive above endMission's if ( isDedicated ) then { //End mission on server [] call BIS_fnc_endMission; }; }] call BIS_fnc_addScriptedEventHandler; TEST_MISSION auto depletes tickets for testing and includes example of custom debriefing section (4/4). Share this post Link to post Share on other sites