View Single Post
  #1  
Old 10-31-2012, 10:48 AM
moggel moggel is offline
Approved Member
 
Join Date: Mar 2011
Posts: 70
Default Triggers not working with scripts

Hi everyone, long time and so on ...

I've been away for some time doing other things but I'm currently in testing mode for a new mod I call "Fighter Command". But as I created missions that rely on (timed) triggers they simply doesn't work. At first I suspected my code but it seems triggers simply doesn't wotk at all for missions that supports a script (.cs) file.

I created this litte file:

Code:
using System;
using maddox.GP;
using maddox.game;
using maddox.game.world;
using part;

public class Mission : AMission
{
    public override void OnTrigger(int missionNumber, string shortName, bool active)
    {
        base.OnTrigger(missionNumber, shortName, active);
        GamePlay.gpLogServer(null, "Trigger '" + shortName + "' = " + active, null);
    }
}
The lines above does confirm that the triggers are honored by the sim but nothing gets spawned! I then tried to remove the .cs file and then it works fine.

Has anyone else seen this?
__________________
Core i7 3930K @ 4.8GHz; 16Gb DDR3 (Vengeance); nVidia GTX580; OS disk: 150Gb 10000rpm; SIM disk: 300Gb 10000rpm; Windows 7 x64 Ultimate
Reply With Quote