![]() |
spawn airgroups?
just cannot get airplanes to spawn.
in the FMB i want to spawn a group of planes after another is destroyed, but nothing happens.:confused: after i destroyed the first group, the second will just not appear. can someone please explain how to do that? |
The Trigger-Action was broken a few patchs ago. You have to activate the Action by script.
First define Triggers as usual (Groupdead Triggers must have same Name as the Spawn-Action) and then implement the following into your script: Code:
public override void OnTrigger(int missionNumber, string shortName, bool active) |
thx but doesnt seem to work...
|
... and doesn't seem to work for me either (spawning a bomber group every x seconds) :(
|
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; |
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) Check if both action and trigger are defined correctly (trigger type, airgroup, etc.) and saved in FMB. |
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. :cool:
|
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; } } |
Quote:
Try without the delay. |
1 Attachment(s)
Made a sample mission, the Doniers spawn after 10sec.
|
All times are GMT. The time now is 06:47 AM. |
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.