![]() |
|
#1
|
|||
|
|||
![]() Quote:
using System; using maddox.game; using maddox.game.world; using System.Collections.Generic; public class Mission : AMission { public override void OnTickGame() { // Timing parameters int Repeat = 108000; // ?? repeat mission every 60 min int Dlay = 18000; // ?? launch Dorniers flights every 10 min // load the Dornier's bombers sub-mission every ??10 min if (Time.tickCounter() % Repeat == Dlay) // what does repeat parameter do? Dlay seems to spawn bombers every 10min OK { GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/Test/Dorniers.mis"); // prints message on screen after mission load GamePlay.gpHUDLogCenter("Another wave of German bombers heading towards Lympne airfield"); // prints message on screen in 10 minutes / 600 seconds double initTime = 0.0; Timeout(initTime += 600, () => { GamePlay.gpHUDLogCenter("Another wave of German bombers heading towards Lympne airfield"); }); } } }
__________________
When one engine fails on a two engine bomber, you will always have enough power left to get to the scene of the crash. Get the latest COD Team Fusion patch info HERE |
#2
|
|||
|
|||
![]()
if (Time.tickCounter() % Repeat == Dlay) //
Ok % is the Modulo operator in c# Repeat has a value of 108000 Dlay has a value of 1800 So your mission would load first after 10min and then every 60min. for every 10min you should use if (Time.tickCounter() % 1800 == 1799) so it waits ~10min and then repeat the doniers every 10min 30ticks are around 1sec, but can vary (so often 34Ticks is a second). |
![]() |
|
|