bvrettski 10 Posted January 12, 2016 I'm building a custom version of Wasteland and trying to create a much more random experience. To that end I'd like to build in random timers for the missions so they arey arent like clockwork. For example: From the default_config.sqf file for the A3Wasteland mission there is the following setting: Line 135: A3W_mainMissionDelay = 10*60; // Time in seconds between Main Missions The other reference to this setting is in the mainMissionController.sqf : Line 10: #define MISSION_CTRL_DELAY (["A3W_mainMissionDelay", 15*60] call getPublicVar) I have been trying to write code that would randomize the mission delay between 10*60 (10 minutes) and 20*60 (20 minutes) with no success. With bypassing the variable and adding it to the MissionController or as a variable within the config file. I think it would be best if were coded into the config file but either way is acceptable. Can someone give me a little coding assistance because as coding noob I'm fumbling around trying to make this work without a proper understanding of the format needed to make it work. Share this post Link to post Share on other sites
cosmic10r 2331 Posted January 12, 2016 i just tested this in the editor and it seems to work 10+random 10*60 should work in either space.... Share this post Link to post Share on other sites
bvrettski 10 Posted January 12, 2016 i just tested this in the editor and it seems to work 10+random 10*60 should work in either space.... Thanks. Testing now Share this post Link to post Share on other sites
bvrettski 10 Posted January 12, 2016 It works but the only downside is the missions are announced with fractions of a second now..so instead of 10 minutes it will say 10.3659 seconds. lol Share this post Link to post Share on other sites
cosmic10r 2331 Posted January 12, 2016 It works but the only downside is the missions are announced with fractions of a second now..so instead of 10 minutes it will say 10.3659 seconds. lol oops lol yeah if its just straight time you can do 600 +random 600; 10*60 + random 10*60 works too but there is likely a reason beyond me they are using multiplication math is not my strong suit.... sadly Share this post Link to post Share on other sites
ArmaMan360 94 Posted January 13, 2016 myNewTime = random 24; publicVariable "myNewTime"; waitUntil{not isNil "myNewTime"}; skipTime myNewTime; Share this post Link to post Share on other sites