View Single Post
  #12  
Old 10-05-2011, 11:18 AM
salmo salmo is offline
Approved Member
 
Join Date: Mar 2011
Posts: 632
Default

Quote:
Originally Posted by Ataros View Post
Sorry after reading the OP post I was thinking the trigger is airgroup destroyed, not TTime 10. My bad



But anyway, I think it is not possible to repeat spawn with a trigger only. It is better to use ontickgame method in a script described for instance in link #2 in my sig.
Thankyou Ataros. I'm aiming to spawn a group of Dorniers every XX min, so I've created the main mission (has all ground objects etc), and a sub-mission with only the Dornier bombers flight & waypoints. Here's my script so far which seem to be working, but I'm a little unsure of the timing parameters & their meaning ...

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
Reply With Quote