Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 10-04-2011, 03:50 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

Made a sample mission, the Doniers spawn after 10sec.
Attached Files
File Type: zip Donier.zip (1.0 KB, 77 views)
Reply With Quote
  #2  
Old 10-15-2011, 10:20 AM
David198502's Avatar
David198502 David198502 is offline
Approved Member
 
Join Date: Dec 2009
Location: Austria
Posts: 1,536
Default

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.
Reply With Quote
  #3  
Old 10-15-2011, 11:13 AM
David198502's Avatar
David198502 David198502 is offline
Approved Member
 
Join Date: Dec 2009
Location: Austria
Posts: 1,536
Default

thats what i did so far...
Attached Files
File Type: zip scriptversuch.zip (1.3 KB, 8 views)
__________________
Reply With Quote
  #4  
Old 10-15-2011, 11:47 AM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

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!");
            }
        }
    }
}
What you need:
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.
Attached Files
File Type: zip SpawnAircraft.zip (1.2 KB, 19 views)

Last edited by FG28_Kodiak; 10-15-2011 at 01:03 PM.
Reply With Quote
  #5  
Old 10-15-2011, 02:00 PM
David198502's Avatar
David198502 David198502 is offline
Approved Member
 
Join Date: Dec 2009
Location: Austria
Posts: 1,536
Default

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.
__________________
Reply With Quote
  #6  
Old 10-15-2011, 02:33 PM
David198502's Avatar
David198502 David198502 is offline
Approved Member
 
Join Date: Dec 2009
Location: Austria
Posts: 1,536
Default

ok tried again and answered some question by myself...its possible to increase the number of the planes...
after i let the hurri spawn further away and let it start on an airfield, the came doesnt crash anymore when spawning.

but it seems that after i shot down the first hurri, another spawns as expected, but after a few seconds, another one spawns without obvious reason....
happens everytime.so if i begin with one hurri, after i shot it down, i will have suddenly two enemies.
if i increase the the number from the beginning, the same thing seems to happen....but im still not sure when the respawn does take place in that situation....do i have to shoot down the first plane of the flight to trigger a respawn, or do i have to kill all planes of the flight??
__________________
Reply With Quote
  #7  
Old 10-15-2011, 02:44 PM
Osprey's Avatar
Osprey Osprey is offline
Approved Member
 
Join Date: Jan 2010
Location: Gloucestershire, England
Posts: 1,264
Default

From what I understand so far is that if you set up triggers in the FMB then they are no longer working and you have to use a script to fire them?

I am trying to airspawn a fighter escort when the bomber group pass through their sector, otherwise they all spawn together and the fighters are off into the distance and gone.

I have set a trigger for Blue when they enter the fighter area but they are spawning in on map start. I am selecting File>Play mission in order to test.
Reply With Quote
  #8  
Old 10-15-2011, 02:49 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

Quote:
Originally Posted by David198502 View Post
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....
Hm normaly yes, seems i misinterpreted your posting.

Quote:
i also expierence many game crashes, i think mainly when im near the spawning aera..
Could also be the steppe map, must try this but on my computer i didn't have a crash. May be its better to spawn an other group of planes not the same again and again.

Quote:
-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.
It depens which aircraft you shot down. BoB_RAF_F_FatCat_Early.000 is the leading Airplane. You can change the "actor.Name().Contains("BoB_RAF_F_FatCat_Early.000 ")" in
actor.Name().Contains("BoB_RAF_F_FatCat_Early") so every plane in the goup counted.

Quote:
-how do i determine the name of the plane???
The easy way with external view, you have the option "show object name" if enabled the game shows you the name you need.

Quote:
-whats the planecount you mentioned to improve the mission???
At the moment a new plane spawns after the leader plane is shot down. But
you can improve the script. For example:
Code:
using System;
using System.Collections.Generic;
using maddox.game;
using maddox.game.world;


public class Mission : AMission
{
    int planecounter = 0;

    
    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"))
            {
                planecounter++;

                if (planecounter >= 2)
                {
                    MakeNewAircraft.Do();
                    GamePlay.gpHUDLogCenter("New Enemy spawned!");
                }
            }
        }
    }

}
Now you must shot down two planes of the group, before other spawns.


Quote:
i know i have many questions and im really greatful for your help.
No problem.

Last edited by FG28_Kodiak; 10-15-2011 at 02:58 PM.
Reply With Quote
  #9  
Old 10-15-2011, 04:23 PM
David198502's Avatar
David198502 David198502 is offline
Approved Member
 
Join Date: Dec 2009
Location: Austria
Posts: 1,536
Default

hey Kodiak!thx again will try that out immediately.....

but yet i have another question:i want to build a mission, where london gets continually bombed....i mean really destroyed, that if one flies over the city, one can see the damage everywhere...for that i used the script called "scripting for dummies" i think where one can create a main mission and 3submissions which will load after a certain time...it works, but now i have the problem that my He's stay on the map, and every ten minutes 30new He's spawn to bomb the city...so after 30minutes the mission grinds my pc to a halt because i have over 100 planes in the air...so i want the He's to dissapear again after they reached a certain waypoint...is that possible???and how??
this is what i have so far...
Attached Files
File Type: zip totalwar.zip (7.1 KB, 8 views)
__________________

Last edited by David198502; 10-15-2011 at 04:40 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:10 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.