![]() |
|
#1
|
|||
|
|||
![]()
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 |
#2
|
|||
|
|||
![]() 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 |
#3
|
|||
|
|||
![]() |
#4
|
|||
|
|||
![]()
Made a sample mission, the Doniers spawn after 10sec.
|
#5
|
||||
|
||||
![]()
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. |
#6
|
||||
|
||||
![]()
thats what i did so far...
|
#7
|
|||
|
|||
![]()
I've tested your mission, the problem is that the trigger is never triggered (testet it with different numbers of planes and plane types), then remove the trigger and made a new one but no effect, may be a bug in the Beta. Normaly your code should work.
So I made a workaroung without trigger. Code:
using System; using System.Collections.Generic; using maddox.game; using maddox.game.world; public class Mission : AMission { public override void OnActorDead(int missionNumber, string shortName, AiActor actor, List<DamagerScore> damages) { base.OnActorDead(missionNumber, shortName, actor, damages); AiAction MakeNewAircraft = GamePlay.gpGetAction("SpawnAircraft"); if (actor != null && MakeNewAircraft != null) { if (actor.Name().Contains("BoB_RAF_F_FatCat_Early.000")) { MakeNewAircraft.Do(); GamePlay.gpHUDLogCenter("New Enemy spawned!"); } } } } The script, a action in your Mission (i labled it "SpawnAircraft"), the name of the plane to destroy. A new Airplane spawns after the previous is shoot down, you can improve it by adding a Planecount, etc. Last edited by FG28_Kodiak; 10-15-2011 at 01:03 PM. |
![]() |
|
|