Jump to content
Sign in to follow this  
Online

Time of Day Parameter

Recommended Posts

Hi Guys,

i searched already every thread about time parmeters, but i dont find a solution for my problem.

I want a parameter to set the time of day of the mission in the lobby.

My description.ext

titleParam1 = "Time limit:";

valuesParam1[] = {0, 300, 600, 900};

textsParam1[] = {"Unlimited", "5 min", "10 min", "15 min"};

defValueParam1 = 900;

titleParam2 = "Time of Day";

valuesParam2[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23};

textsParam2[] = {"0000","0100","0200","0300","0400","0500","0600","0700","0800","0900","1000","1100","1200","1300","1400","1500","1600","1700","1800","1900","2000","2100","2200","2300"};

defaultParam2 = 16;

And my init.sqf

estimatedtimeleft param1;

skiptime param2;

I see both parameters in the lobby and the time limit parameter works fine. But every time i start the map, its 12:00.

Maybe anyone can help me to solve this problem?

---------- Post added at 23:41 ---------- Previous post was at 23:34 ----------

Okay... after i post this thread i find the solution.

I only need to set the ingame missiom time to 0:00 and now the parameter works.

I hope this will help other people. :)

Share this post


Link to post
Share on other sites

Edit:

i improved this param like this:

description

class TimeOfDay

{

//paramsArray[0]

title = "Time of Day:";

values[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23};

texts[] = {"0000","0100","0200","0300","0400","0500","0600","0700","0800","0900","1000","1100","1200","1300","1400","1500","1600","1700","1800","1900","2000","2100","2200","2300"};

default = 16;

};

init

//Time of Day

definedTime = (paramsArray select 0);

skipTime definedTime;

With this method i can use more than two parameters for a mission. With the post in the top i can only use 2.

Share this post


Link to post
Share on other sites

This doesnt seem to work for JIP players...when someone joins in progress itll skiptime ahead on the JIP player from the mission start time instead of the mission save time making the JIP'ers time much later than everyone who initally joined the server at mission start.

Anyone know how to make this work for JIP?

Share this post


Link to post
Share on other sites

Try this:

if isServer then {definedTime = (paramsArray select 0)};

if isServer then {skipTime definedTime;};

Share this post


Link to post
Share on other sites

I've been looking for this forever. Thank you SO much. :) I'm finally able to use the parameters on my missions now.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×