vredesbyrd 10 Posted September 21, 2013 As per my original thread (linking to save repost/spam) I think I've gotten it working, I just wanted to clarify something and ask a followup question: Clarification: Because I'm using mission template "Tickets" and "EndMission", from what I understand, this means that team X has X amount of tickets and when the ticket limit has been reached the game still will not end until the remaining players from team X are also killed off because they are infact still 'in' a respawn - Is this correct? If not: I only ask because, on my travels, I've found reference to a situation where use of the ticket system with more than 1 player per team means that the amount of base tickets is multiplied by the number of players, e.g. 4 Opfor players on a 10 ticket map will mean Opfor actually have 40 tickets - Is this the case? If the latter IS the case, how do I change it to a global ticket count? (If not, no worries!) The question I wanted to ask is: Is there a way to set any players who have died after the tickets have expired to respawn as a seagul or as spectator? Thank you for any help. Share this post Link to post Share on other sites
vredesbyrd 10 Posted September 21, 2013 Risking a slap for a double post (appologise Admins/Mods): Having a bit of an issue. The mission doesn't end when tickets have expired AND all remaining players for that team have died. Any one any ideas? - Here's the original thread with the code I'm using. ---------- Post added at 19:03 ---------- Previous post was at 18:04 ---------- I've re-read this thread and spotted that I don't appear (think) to have anything which specifically tells a player which side to take their tickets from, so I've added it but still have the issue where, when all tickets have expired and all players are dead for team X, the mission does not end, team X players are simply locked out. Description.ext: respawn = 3; respawnDelay = 5; respawnDialog = 1; respawnVehicleDelay = 240; aikills = 0; respawnTemplates[] = {"Tickets","EndMission","Counter","MenuPosition"}; Author = "ZiiP Vredesbyrd"; class Header { gameType = TDM; minPlayers = 1; maxPlayers = 25; }; init.sqf: [west, 2] call BIS_fnc_respawnTickets; [east, 2] call BIS_fnc_respawnTickets; enableSaving [false, false]; onPlayerRespawn.sqf: private["_wtickets","_etickets"]; _wtickets = [west] call BIS_fnc_respawnTickets; _etickets = [east] call BIS_fnc_respawnTickets; if (side player == west) then {hint format ["NATO has %1 ticket(s) left",_wtickets];}; if (side player == east) then {hint format ["CSAT has %1 ticket(s) left",_etickets];}; initPlayerLocal.sqf: if (side group player == west) then {"ticketsWest"} else {"ticketsEast"}; player setVariable ["BIS_fnc_respawnTickets_var",_var]; Desperate for some help here as I cannot find another source of information like this thread. Edit: I think I'm being extra green here, does not the initPlayerLocal.sqf and onPlayerRespawn.sqf have the same function/do the same thing? Thoroughly confused. Share this post Link to post Share on other sites
vredesbyrd 10 Posted September 21, 2013 Ok, doing a bit of leg work and contacting a very awesome friend of mine, he identified the problem we are having. In his words: "there's nothing specific to it ending the mission automatically." So, digging around, my awesome friend found that an Event Handler is run named "respawnTicketsExhausted" which relates to the 'fn_respawnTicket.sqf' file, specifically this section: //--- Tickets exhaused - trigger a scripted event if (_tickets == 0 && _value != 0) then { [[missionnamespace,"respawnTicketsExhausted",[_target]],"bis_fnc_callscriptedeventhandler",false] call bis_fnc_mp; }; The direction this awesome friend was able to point me in was to take the whole 'fn_respawnTicket.sqf' and create my own .sqf which will be called instead of the BIS function and will have custom exit code where the tickets exhausted condition is. HOW you go about this, I am still figuring out, but I've shared this in the hope someone with a little more knowledge could pick it up and run with it quicker than my shambling attempts! Share this post Link to post Share on other sites
vredesbyrd 10 Posted September 22, 2013 Bump? - Come on! I know some people on this site know the way forward because I've seen the missions you pump out! PLEASE! Share this post Link to post Share on other sites
vredesbyrd 10 Posted September 22, 2013 Embarassingly greenly of me, I've been approaching this from an upsidedown and backwards direction: I'm basically trying to get TDM to count the number of deaths a side incurs instead of the number of kills. Why? - Because 42. Who knows? Answer: Make it a TDM mission: Description.ext: class Header { gameType = TDM; minPlayers = 1; maxPlayers = 16; }; respawn = 3; respawnDelay = 5; respawnDialog = 1; respawnVehicleDelay = 240; respawnTemplatesWest[] = {"EndMission","Counter","MenuPosition"}; respawnTemplatesEast[] = {"EndMission","Counter","MenuPosition"}; //Load screen mission name onLoadName = "Defense of Syrta V4"; //Load screen mission info onLoadMission = "Nato must hold off a CSAT attack until their forces are exhausted"; //My load screen is stored in a folder in the PBO called 'images' - Change as needed loadScreen = "images\Defense Of Syrta.jpg"; Author = "ZiiP Vredesbyrd with thanks to Sho, Stapo, Moricky and Kylania"; init.sqf: if ((!isServer) && (player != player)) then { waitUntil {player == player}; }; enableSaving [false, false]; //Ends the mission when West or East have scored more than X - in this case 2 //Credit to Stapo for Ultimate Team Deathmatch code _endmission = false; while {NOT _endmission} do { { if ((scoreSide WEST >= 2) || (scoreSide EAST >= 2)) then { _endmission = true; }; } forEach allUnits; }; "END1" call BIS_fnc_endMission; So, yeah. :o Share this post Link to post Share on other sites
Brianlgs 10 Posted September 26, 2013 excuse my language translation to English codes used eh mentioned and I could create the ticket system but I would be missing some details to be resolved .... if I can help I need to display on screen the player and the side opfor BLUFOR or the amount of ticket there on aggregate on each side ... what would be the command to use? try the one mentioned in the wiki and it does not work ... I are missing something ... Ideas? suggestions to show overall ticket apiece on the player's screen? the other thing I would like to implement is that when one of the two sides reach 0 ticket screen showing a sign of lost and gained according to the side ... is it possible? help me? Share this post Link to post Share on other sites
kylejtown 1 Posted October 7, 2013 What I am working on is a conquest style mission for 64 players. When the tickets for one side reach 0 I would like for that side to loose the mission. The problem i'm running into is that when a sides tickets reach 0 then you simply can't respawn, the mission doesn't end like it should. I have been going crazy looking for a solution. I have checked the wiki: http://community.bistudio.com/wiki/Arma_3_Respawn#Respawn_Templates http://community.bistudio.com/wiki/BIS_fnc_respawnTickets Which led me to believe that all I need is the respawn templates Tickets and EndMission and once the tickets hit 0 it would end the mission. Any help would be greatly appreciated! Here is my Init.sqf file: if ((!isServer) && (player != player)) then { waitUntil {player == player}; }; enableSaving [false, false]; //Viewdistance setviewdistance 1000; //will set number of respawns each side gets [west,200] call BIS_fnc_respawnTickets; [east,200] call BIS_fnc_respawnTickets; if ((!isServer) && (player != player)) then { waitUntil {player == player}; }; //Loadouts [west, "WEST1"] call BIS_fnc_addRespawnInventory; [west, "WEST2"] call BIS_fnc_addRespawnInventory; [west, "WEST3"] call BIS_fnc_addRespawnInventory; [west, "WEST4"] call BIS_fnc_addRespawnInventory; [west, "WEST5"] call BIS_fnc_addRespawnInventory; [west, "WEST6"] call BIS_fnc_addRespawnInventory; [west, "WEST7"] call BIS_fnc_addRespawnInventory; [west, "WEST8"] call BIS_fnc_addRespawnInventory; [east, "EAST1"] call BIS_fnc_addRespawnInventory; [east, "EAST2"] call BIS_fnc_addRespawnInventory; [east, "EAST3"] call BIS_fnc_addRespawnInventory; [east, "EAST4"] call BIS_fnc_addRespawnInventory; [east, "EAST5"] call BIS_fnc_addRespawnInventory; [east, "EAST6"] call BIS_fnc_addRespawnInventory; [east, "EAST7"] call BIS_fnc_addRespawnInventory; [east, "EAST8"] call BIS_fnc_addRespawnInventory; and here is my Description.ext: Author = ""; loadScreen = ""; OnLoadName = ""; onLoadMission = ""; OnLoadMissionTime = false; Respawn = BASE; RespawnDelay = 10; disabledAI = true; corpseLimit = 64; corpseRemovalMinTime = 60; corpseRemovalMaxTime = 120; respawnTemplates[] = {"MenuPosition","tickets","menuinventory","endmission"}; #include "VAS\menu.hpp" #include "cfgRespawnInventory.hpp" class Header { gameType = SC; minPlayers = 1; maxPlayers = 64; }; class CfgFunctions { #include "VAS\cfgfunctions.hpp" }; Share this post Link to post Share on other sites
KingoftheSandbox 10 Posted December 4, 2013 So after months and month this is still buggy...I cant add tickets via the orders from the biki to players or sides. Does any new feature work in this game? [west,5] call BIS_fnc_respawnTickets; this just doesnt work Share this post Link to post Share on other sites
sorophx 25 Posted March 27, 2014 ok, so I'm trying to get this function to add only one ticket per player. at first I thought passing [player,1] should have worked, but it didn't for some reason. does anyone know how exactly this ticket system works? Share this post Link to post Share on other sites
logitrust 10 Posted August 16, 2014 Im trying to get the tickets to work with the class params before starting the missions, so far so god. but need a re-wright, will post here when i get it working: class Respawns { title = "RESPAWNS:"; values[] = {0,1,2,3,4,5,6}; texts[] = {"No Respawn","One Respawn","Two Respawns","Three Respawns","Four Respawns","Five Respawns","Unlimited Respawns"}; default = 6; }; } Share this post Link to post Share on other sites
m1ndgames 10 Posted May 9, 2015 Hi, the tickets work as intended, but i cant find a way to manually remove tickets from a pool. BIS_fnc_respawnTickets only supports reading and adding... :/ any hint? Share this post Link to post Share on other sites
Senshi 10 Posted May 10, 2015 [WEST,-5] call BIS_fnc_respawnTickets; doesn't work for you? Share this post Link to post Share on other sites
PabloDMA 16 Posted July 9, 2018 Hi everyone! Is there any way to have individual respawn tickets? I mean, as player if I die 2 times, i should not be able to re-join the battle no matter how many remaining tickets east or west factions have I tried with this on the init.sqf: if (isServer) then { [a1, 2] call BIS_fnc_respawnTickets; [a2, 2] call BIS_fnc_respawnTickets; [a3, 2] call BIS_fnc_respawnTickets; [a4, 2] call BIS_fnc_respawnTickets; [a5, 2] call BIS_fnc_respawnTickets; }; a1 is unit name, 2 available tickets Im not having the expected results, since if a player joins the mission in progress, (suppose A6) is assigned with 10 respawn tickets Thanks! Share this post Link to post Share on other sites
gokitty1199 225 Posted July 9, 2018 2 hours ago, PabloDMA said: Hi everyone! Is there any way to have individual respawn tickets? I mean, as player if I die 2 times, i should not be able to re-join the battle no matter how many remaining tickets east or west factions have I tried with this on the init.sqf: if (isServer) then { [a1, 2] call BIS_fnc_respawnTickets; [a2, 2] call BIS_fnc_respawnTickets; [a3, 2] call BIS_fnc_respawnTickets; [a4, 2] call BIS_fnc_respawnTickets; [a5, 2] call BIS_fnc_respawnTickets; }; a1 is unit name, 2 available tickets Im not having the expected results, since if a player joins the mission in progress, (suppose A6) is assigned with 10 respawn tickets Thanks! checkout this thread alter boriz/sxp2high posts and combine it together with a variable and killed event handler like so and you have something like this player setVariable ["deathCount", 0, true]; player addEventHandler ["Killed", { params ["_unit"]; _count = _unit getVariable ["deathCount", 0]; _count = _count + 1; _unit setVariable ["deathCount", _count, true]; if (_count == 2) then { call cantRespawnFnc; }; }]; cantRespawnFnc = { RscSpectator_allowFreeCam = true; RscSpectator_hints = [true,true,true]; _spectatorLayer = ["specator_layer"] call BIS_fnc_rscLayer; setPlayerRespawnTime 9999; _spectatorLayer cutRsc ["RscSpectator", "PLAIN"]; }; 1 Share this post Link to post Share on other sites
PabloDMA 16 Posted July 10, 2018 20 hours ago, gokitty1199 said: checkout this thread alter boriz/sxp2high posts and combine it together with a variable and killed event handler like so and you have something like this player setVariable ["deathCount", 0, true]; player addEventHandler ["Killed", { params ["_unit"]; _count = _unit getVariable ["deathCount", 0]; _count = _count + 1; _unit setVariable ["deathCount", _count, true]; if (_count == 2) then { call cantRespawnFnc; }; }]; cantRespawnFnc = { RscSpectator_allowFreeCam = true; RscSpectator_hints = [true,true,true]; _spectatorLayer = ["specator_layer"] call BIS_fnc_rscLayer; setPlayerRespawnTime 9999; _spectatorLayer cutRsc ["RscSpectator", "PLAIN"]; }; Thanks! Sorry, i'm not an expert on scripting. ..Where should i try this? Directly on the init.sqf? Share this post Link to post Share on other sites
gokitty1199 225 Posted July 10, 2018 4 hours ago, PabloDMA said: Thanks! Sorry, i'm not an expert on scripting. ..Where should i try this? Directly on the init.sqf? well id suggest using cfgFunctions and sorting the event handler, but making it simple just put it in a separate .sqf file and use execVM to run it. put the execVM in initPlayerLocal 1 Share this post Link to post Share on other sites
topden 62 Posted January 18, 2019 In mission have command [west, 1] call BIS_fnc_respawnTickets; tell me how to add a respawn tickets if a player did something (for example, the player approaches the box, clicks the "take" menu and gets +1 ticket) Share this post Link to post Share on other sites