View Single Post
  #28  
Old 10-16-2011, 10:50 AM
Osprey's Avatar
Osprey Osprey is offline
Approved Member
 
Join Date: Jan 2010
Location: Gloucestershire, England
Posts: 1,264
Default

It's ok, I blanked it and I've done some reading, but I'm getting just plain frustrated that's all:

Quote:
Originally Posted by FG28_Kodiak View Post
Made a sample mission, the Doniers spawn after 10sec.
I put this into my dogfight folder and opened in FMB, and then did 'Play Mission'. It worked perfectly. BUT, when I used the same code on my mission (obviously with the triggername edited) it was ignored.

I have an historical mission I am making. There is a bomber attack spawning deep in France and it requires a fighter sweep 5 mins ahead. The fighter bases are nearer to the coast so at present they all spawn in together and naturally the fighters have completed their run well before the bombers are in the area. Here's what I have done and stumbled on:

1. An area trigger for the fighters so that when the bombers pass through the trigger zone they spawn in. The outcome is that the trigger is totally ignored. There is another bug where DOUBLE the number of aircraft are spawned in as you've set up in the mission. No idea why.
2. I changed the trigger to a time delay copying your script but again, the fighters simply spawned in. This time I had them groundstart but on one base the ground wasn't rendered in time and all the fighters nosedived into the sea - in the middle of France!!!
3. I changed the trigger time delay to match your script for a single fighter but again the trigger was ignored.

What I really don't understand is how your script works and mine doesn't yet the only difference is the fighter group selected and the map. Why would your script be run but mine ignored??

Quote:
using System;
using maddox.game;
using maddox.game.world;
using System.Collections.Generic;

public class Mission : AMission
{

public override void OnTrigger(int missionNumber, string shortName, bool active)
{
base.OnTrigger(missionNumber, shortName, active);

if ("FighterSweep".Equals(shortName) && active)
{
AiAction action = GamePlay.gpGetAction("FighterSweep"); //same as YourTriggerName
GamePlay.gpLogServer(null, "Fighter sweep spawned ", new object[] { }); //Testmessage
if (action != null)
{
action.Do();
}
GamePlay.gpGetTrigger(shortName).Enable = false;
}
}
}

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~
.mis
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~

[Trigger]
FighterSweep TTime 60
[Action]
FighterSweep ASpawnGroup 1 BoB_LW_JG3_I.01


Last edited by Osprey; 10-16-2011 at 10:52 AM.
Reply With Quote