stonie01333 10 Posted April 12, 2014 Hi Im new to scripting and need some info or help setting up a score/ticket system for a TvTvT Sector control mission ive been working on..Ive looked around but to be honest am a little confused at this point. :( Any help would be much appreciated Share this post Link to post Share on other sites
TAW_Yonose 11 Posted April 13, 2014 Im not 100% sure on this, but as i have heard the scoreboard depends which diff. you set on the server. However not sure if this is actually true. I think i saw a ticket module in arma3 after zeus update, so i guess you just need to throw down that module and set how many tickets you want for each side (you do that in the module) Can't help you more at the moment but good luck mate. Share this post Link to post Share on other sites
stonie01333 10 Posted April 13, 2014 You would be right, there is a ticket module now..now i need to figure out how to add a ticket count number Share this post Link to post Share on other sites
stonie01333 10 Posted April 13, 2014 Not having any joy with adding a ticket count..i can see the teams emblems on screen but they are set to 0..anybody else used the new ticket module? ---------- Post added at 19:18 ---------- Previous post was at 17:28 ---------- seems to be adding points when taking over area Share this post Link to post Share on other sites
stonie01333 10 Posted April 14, 2014 Any links on ticket bleed module?..cant seem to find any Share this post Link to post Share on other sites
SavageCDN 231 Posted April 14, 2014 (edited) for the default BIS ticket system: https://community.bistudio.com/wiki/Arma_3_Respawn#Respawn_Templates add this to your description.ext (applies to all sides) respawnTemplates[] = {"Tickets"}; If side specific templates are defined it will use those instead respawnTemplatesGuer[] = {"Tickets"}; In your init.sqf add: [west,5] call BIS_fnc_respawnTickets; This will add 5 tickets to the West side... so you can define your starting tickets here [west,50] call BIS_fnc_respawnTickets; [east,50] call BIS_fnc_respawnTickets; [resistance,50] call BIS_fnc_respawnTickets; I believe you can also add more tickets mid-mission by using the same line but have not tested that Edited April 15, 2014 by SavageCDN fixed stupid SIDES!!! Share this post Link to post Share on other sites
stonie01333 10 Posted April 14, 2014 Thanks thats done the trick..i just needed to change [guerilla,50] call BIS_fnc_respawnTickets; to [resistance,50] call BIS_fnc_respawnTickets; Many thanks again guys :) Share this post Link to post Share on other sites
SavageCDN 231 Posted April 15, 2014 ah yes ooops :p Fixed original post. Share this post Link to post Share on other sites
stonie01333 10 Posted April 15, 2014 Thanks for your help Savage :) Share this post Link to post Share on other sites
stonie01333 10 Posted April 16, 2014 Now i seem to have a problem when the mission is run on a server..the ticket total doesnt match the init lines...grrrr :( Share this post Link to post Share on other sites
SavageCDN 231 Posted April 16, 2014 what are the totals if you use 50 tickets for each side? perhaps the game auto-adds some tickets by default? Share this post Link to post Share on other sites
stonie01333 10 Posted April 16, 2014 (edited) Got it set to 500 tickets..ingame 500 preview 500 on server 1000..lol..not a game breaker..will see later on, if its just doubling what i put in init Edited April 16, 2014 by stonie01333 Share this post Link to post Share on other sites
stonie01333 10 Posted April 16, 2014 Nah its random...restarted server and ticket count was starting at 1500 :( Share this post Link to post Share on other sites
androkiller 10 Posted April 17, 2014 i maybe wrong but your init.sqf is run by client and server so when ever someone joins the init is run so wat u need to do is make sure the line with all you ticket stuff is only run by the server and not all jip clients so in your init put this at the top waitUntil { isServer || local player }; at the bottom put this if (local player) then { call compile preprocessFileLineNumbers "initclient.sqf"; }; if (isServer) then { call compile preprocessFileLineNumbers "initserver.sqf"; }; then make the to sqfs "initserver.sqf" "initclient.sqf" and put the code u need for your ticket counter in the server.sqf see if that works Share this post Link to post Share on other sites
SavageCDN 231 Posted April 17, 2014 ^ didn't even think of that silly me I assumed the BIS function to add respawn tickets would only work on the server :p You could also wrap those ticket lines in an if (isServer) then {code}; in your init.sqf Share this post Link to post Share on other sites
stonie01333 10 Posted April 17, 2014 Sorry guys i need more info, as im trying to follow what your saying but it doesn't seem to be working..It probably my fault :( Share this post Link to post Share on other sites
SavageCDN 231 Posted April 17, 2014 Try this in your init.sqf: if (isServer) then { [west,50] call BIS_fnc_respawnTickets; [east,50] call BIS_fnc_respawnTickets; [resistance,50] call BIS_fnc_respawnTickets; }; As Androkiller mentioned both the clients and server run the init.sqf file so this should force only the server to run that section of code that adds the tickets (instead of all the clients). Share this post Link to post Share on other sites
stonie01333 10 Posted April 17, 2014 Thats it sorted..thanks for the help :) Share this post Link to post Share on other sites
stonie01333 10 Posted April 18, 2014 OK heres one for you..how do i set win/loose scenario? that matches the ticket count Share this post Link to post Share on other sites
SavageCDN 231 Posted April 19, 2014 Never done that before but check these: https://community.bistudio.com/wiki/BIS_fnc_respawnTickets http://www.armaholic.com/forums.php?m=posts&q=24433 The 1st link shows a function that returns the number of tickets left so you'd have to have something that checks and when count = 0 ends the mission. 2nd link seems to go into more detail and sounds like what you are looking for. Share this post Link to post Share on other sites
stonie01333 10 Posted April 19, 2014 Now im lost again :( Share this post Link to post Share on other sites
leob 10 Posted April 20, 2014 This seems to be the best thread to do my first post, otherwise I guess I won't be able to create a thread;) Share this post Link to post Share on other sites
stonie01333 10 Posted April 20, 2014 If anybody can have a look at my pbo that would be great. to try and get the win loose scenario set up as my limited knowledge on the scripting is holding the finishing of this mission back..Pm and i will arrange..cheers Share this post Link to post Share on other sites
SavageCDN 231 Posted April 23, 2014 It might be best to find a similar mission that uses tickets, etc on Armaholic and de-pbo the files to check them out. Share this post Link to post Share on other sites