![]() |
|
|
|
#1
|
|||
|
|||
|
Mmh, you are using a script like the following and named your triggers and actions accordingly, also in the script? (Triggername = Actionname)
Code:
using System;
using System.Text;
using System.Collections.Generic;
using maddox.game;
using maddox.game.world;
public class Mission : AMission
{
public override void OnTrigger(int missionNumber, string shortName, bool active)
{
base.OnTrigger(missionNumber, shortName, active);
if ("YourTriggerName".Equals(shortName) && active) //Edit "YourTriggerName"
{
AiAction action = GamePlay.gpGetAction("YourActionName"); //same as "YourTriggerName"
GamePlay.gpLogServer(null, " Your Trigger was triggered ", new object[] { }); //Testmessage
if (action != null)
{
action.Do();
}
GamePlay.gpGetTrigger(shortName).Enable = false;
}
}
}
__________________
http://cornedebrouwer.nl/cf48e Last edited by SNAFU; 10-04-2011 at 01:46 PM. |
|
#2
|
|||
|
|||
|
If you do not use any script FMB triggers would work if name of a trigger and action are the same.
If you have any script working with your mission you have to add a trigger section to it to allow triggers to work. The most simple one is Code:
public override void OnTrigger(int missionNumber, string shortName, bool active)
{
base.OnTrigger(missionNumber, shortName, active);
AiAction action = GamePlay.gpGetAction(ActorName.Full(missionNumber, shortName));
if (action != null)
action.Do();
}
Check if both action and trigger are defined correctly (trigger type, airgroup, etc.) and saved in FMB. |
|
#3
|
|||
|
|||
|
I don´t know if it was fixed in the Beta, but the action (spawn airgroup) of triggers was broken, some patches ago. So you have to use a script to link triggers and actions. I supposed you set the trigger and the action in the FMB.
__________________
http://cornedebrouwer.nl/cf48e |
|
#4
|
|||
|
|||
|
Quote:
Here's the script I used, the trigger & the spawn airgroup (after 60s) actions are both named 'Dorniers'... public override void OnTrigger(int missionNumber, string shortName, bool active) { base.OnTrigger(missionNumber, shortName, active); if ("Dorniers".Equals(shortName) && active) { AiAction action = GamePlay.gpGetAction("Dorniers"); //same as YourTriggerName GamePlay.gpLogServer(null, " German bomber group spawned ", new object[] { }); //Testmessage if (action != null) { action.Do(); } GamePlay.gpGetTrigger(shortName).Enable = false; } }
__________________
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 |
|
#5
|
|||
|
|||
|
|
|
#6
|
|||
|
|||
|
Made a sample mission, the Doniers spawn after 10sec.
|
|
#7
|
||||
|
||||
|
im still not able to spawn a single plane after another one gets destroyed!!!
why the heck has this to be sooo hard to achieve...damn triggers dont seem to work and the scripts showed here in this thread dont seem to work either if i copy and paste them in the mission cs file. Last edited by David198502; 10-15-2011 at 11:13 AM. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|