![]() |
|
|
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
|
|
#3
|
|||
|
|||
|
Made a sample mission, the Doniers spawn after 10sec.
|
|
#4
|
||||
|
||||
|
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 12:13 PM. |
|
#5
|
||||
|
||||
|
thats what i did so far...
|
|
#6
|
|||
|
|||
|
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 02:03 PM. |
|
#7
|
||||
|
||||
|
thx Kodiak, really kind of you!and finally this works!
-if i understand it correctly, if i shoot the hurri, another one spawns, and i could repeat that to infinity??? i ask this, cause so far i tried the mission several times, and after i shot down the 4th hurri, no plane will spawn anymore.... i also expierence many game crashes, i think mainly when im near the spawning aera.. -can i just increase the number of the hurris without changing the script?i did and made a flight of six hurris, and after i shot down the 4th, the message "New Enemy spawned!" appeared, but unfortunately my game crashed. -how do i determine the name of the plane??? -whats the planecount you mentioned to improve the mission??? i know i have many questions and im really greatful for your help. |
![]() |
|
|