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 11-20-2012, 11:42 PM
Aussie Pilot Aussie Pilot is offline
Approved Member
 
Join Date: Nov 2011
Location: Brisbane, Australia
Posts: 27
Default Trigger...Spawn aircraft on destruction of a truck.

Well i have been reading and reading and reading but I still can't get this to work.This is all for testing purposes but even so.

I have 2 groups of He-111's I want to spawn in over the channel once a truck has been destroyed. Before setting up the script they would spawn in at mission begin and fly up to London and back no worries.

The aim here is for some new pilots to take off, see how the plane works and their sim goes on the internet. Then when everyone is ready, drop down and shoot up a friendly truck I want to set as the trigger to spawn the He-111's to come in later instead of at mission begin so we can all test again in combat. I know i could probably set up a timer or a fly through, but not everything seems to go to plane. Someone may take to long or someone may get lost and fly through the trigger. Using the truck gives you more control over when you want your spawn to work.

I have script c selected in both He-111 groups.

In the script window I have all names as "He-111 spawn". The type is set "Tgroupdestroyed", and the trigger (truck) is selected with a 2m radius and about 37% damage.
That, I would have thought looks about right.

Then in actions, I have the same name, then "Aspawngroup", then one of the two He-111 groups is selected.
Then I add another line the same way for the second He-111 group.

Hit save and it's all good. Well the truck spawns at mission begin, I take off in my Spit and shoot the truck up...great explostion and bit's everywhere, but no sign of the He-111's spawning.

Am I doing this right or have I missed something? Thanks.

Last edited by Aussie Pilot; 11-20-2012 at 11:46 PM.
Reply With Quote
  #2  
Old 11-21-2012, 03:43 AM
salmo salmo is offline
Approved Member
 
Join Date: Mar 2011
Posts: 632
Default

Try two destroy-group triggers (for the same vehicle) attached to 2 spawn-group actions (one for each He111 group). Action name must be identical to the relevent trigger name. Something like this ...

Code:
[PARTS]
  core.100
  bob.100
[MAIN]
  MAP Land$English_Channel_1940
  BattleArea 174580 194813 108250 74438 10000
  TIME 12
  WeatherIndex 0
  CloudsHeight 1000
  BreezeActivity 10
  ThermalActivity 10
[splines]
[AirGroups]
  BoB_LW_KuFlGr_706.01
  BoB_LW_KuFlGr_706.02
[BoB_LW_KuFlGr_706.01]
  Flight0  1 2
  Class Aircraft.He-111H-2
  Formation VIC3
  CallSign 26
  Fuel 100
  Weapons 1 1 1 1 1 1 1
  SpawnFromScript 1
  Skill 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3
[BoB_LW_KuFlGr_706.01_Way]
  NORMFLY 258970.100 214280.15 500.00 300.00
  NORMFLY 222071.90 230428.05 500.00 300.00
[BoB_LW_KuFlGr_706.02]
  Flight1  11 12
  Class Aircraft.He-111H-2
  Formation VIC3
  CallSign 30
  Fuel 100
  Weapons 1 1 1 1 1 1 1
  SpawnFromScript 1
  Skill 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3
[BoB_LW_KuFlGr_706.02_Way]
  NORMFLY 258600.70 213920.04 500.00 300.00
  NORMFLY 222348.65 229874.48 500.00 300.00
[CustomChiefs]
[Chiefs]
  0_Chief Vehicle.AEC_Matador gb 
[0_Chief_Road]
  224676.28 228375.41 38.40  0 4 4.17
  S 2167 3 0.50 5.00 P 224686.52 228407.25
  S 2167 0 0.24 20.00 P 224760.03 229823.34
  224759.23 229827.11 38.40
[Stationary]
[Buildings]
[BuildingsLinks]
[Trigger]
  vehicle_destroyed2 TGroupDestroyed 0_Chief 100
  vehicle_destroyed1 TGroupDestroyed 0_Chief 100
[Action]
  vehicle_destroyed2 ASpawnGroup 1 BoB_LW_KuFlGr_706.01
  vehicle_destroyed1 ASpawnGroup 1 BoB_LW_KuFlGr_706.02
__________________
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

Last edited by salmo; 11-21-2012 at 03:56 AM.
Reply With Quote
  #3  
Old 11-21-2012, 04:04 AM
Aussie Pilot Aussie Pilot is offline
Approved Member
 
Join Date: Nov 2011
Location: Brisbane, Australia
Posts: 27
Default

Thanks Salmo, also noticed that even though the text shows up in the mission file when i look at it in my documents folder via notepad, when i go back into FMB it is no longer there in the script window box.

Whats with that? is it because I did it wrong despite saving it.

Edit: I have also just found out my naming may be wrong. I had a space between name words, I see you used an underscore, so i'll give that a try as well.

It's the little things aye.

Last edited by Aussie Pilot; 11-21-2012 at 04:08 AM.
Reply With Quote
  #4  
Old 11-21-2012, 04:40 AM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

You can use a script:

Code:
using System;
using System.Collections.Generic;
using maddox.game;
using maddox.game.world;


public class Mission : AMission
{

    public override void OnBattleStarted()
    {
        base.OnBattleStarted();

        MissionNumberListener = -1;
    }


    public override void OnTrigger(int missionNumber, string shortName, bool active)
    {
        base.OnTrigger(missionNumber, shortName, active);


        GamePlay.gpLogServer(null, "Trigger: {0} activated", new object[]{shortName}); // for testing remove if not longer needed


        if (shortName.Equals("PlaneSpawnTrigger")) // insert the triggername between the ""
        {
            AiAction action = GamePlay.gpGetAction("SpawnAirgroup1"); // insert the actionname between the ""

            if (action != null)
                action.Do();

            action = GamePlay.gpGetAction("SpawnAirgroup2"); // insert the actionname between the ""

            if (action != null)
                action.Do();
        }
        else 
        {
            AiAction action = GamePlay.gpGetAction(shortName);

            if (action != null)
                action.Do();
        }

    }
   

}
Reply With Quote
  #5  
Old 11-24-2012, 12:43 AM
Aussie Pilot Aussie Pilot is offline
Approved Member
 
Join Date: Nov 2011
Location: Brisbane, Australia
Posts: 27
Default

Quote:
Originally Posted by salmo View Post
Try two destroy-group triggers (for the same vehicle) attached to 2 spawn-group actions (one for each He111 group). Action name must be identical to the relevent trigger name. Something like this ...

Code:
[PARTS]
  core.100
  bob.100
[MAIN]
  MAP Land$English_Channel_1940
  BattleArea 174580 194813 108250 74438 10000
  TIME 12
  WeatherIndex 0
  CloudsHeight 1000
  BreezeActivity 10
  ThermalActivity 10
[splines]
[AirGroups]
  BoB_LW_KuFlGr_706.01
  BoB_LW_KuFlGr_706.02
[BoB_LW_KuFlGr_706.01]
  Flight0  1 2
  Class Aircraft.He-111H-2
  Formation VIC3
  CallSign 26
  Fuel 100
  Weapons 1 1 1 1 1 1 1
  SpawnFromScript 1
  Skill 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3
[BoB_LW_KuFlGr_706.01_Way]
  NORMFLY 258970.100 214280.15 500.00 300.00
  NORMFLY 222071.90 230428.05 500.00 300.00
[BoB_LW_KuFlGr_706.02]
  Flight1  11 12
  Class Aircraft.He-111H-2
  Formation VIC3
  CallSign 30
  Fuel 100
  Weapons 1 1 1 1 1 1 1
  SpawnFromScript 1
  Skill 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3
[BoB_LW_KuFlGr_706.02_Way]
  NORMFLY 258600.70 213920.04 500.00 300.00
  NORMFLY 222348.65 229874.48 500.00 300.00
[CustomChiefs]
[Chiefs]
  0_Chief Vehicle.AEC_Matador gb 
[0_Chief_Road]
  224676.28 228375.41 38.40  0 4 4.17
  S 2167 3 0.50 5.00 P 224686.52 228407.25
  S 2167 0 0.24 20.00 P 224760.03 229823.34
  224759.23 229827.11 38.40
[Stationary]
[Buildings]
[BuildingsLinks]
[Trigger]
  vehicle_destroyed2 TGroupDestroyed 0_Chief 100
  vehicle_destroyed1 TGroupDestroyed 0_Chief 100
[Action]
  vehicle_destroyed2 ASpawnGroup 1 BoB_LW_KuFlGr_706.01
  vehicle_destroyed1 ASpawnGroup 1 BoB_LW_KuFlGr_706.02
Hi Salmo.
Well i have tried everything you said. I even went back to scratch and pretty much copied your mission with one less bomber group but I still can't get them to spawn.
I ended up copying your mission you put here pasting it into a mission file, added a spawn area at lypmne and it worked great. I then proceeded to swap back and forth between mine and yours to compare. But even though I can't see it, something is stopping my bombers from spawning on destruction of the truck.

I know i could just use your but then I wouldn't learn anything or find out whats wrong with mine. So i've attached a copy of mine if you don't mind having a look for me when you get a chance, it would be much appreciated.
Attached Files
File Type: txt Online Test Flight Spitfire & Hurricanes.mis.txt (1.2 KB, 4 views)
Reply With Quote
  #6  
Old 11-24-2012, 07:46 AM
salmo salmo is offline
Approved Member
 
Join Date: Mar 2011
Posts: 632
Default

I can't see a problem with your triggers, it should work
__________________
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
Reply With Quote
  #7  
Old 11-24-2012, 11:11 AM
Aussie Pilot Aussie Pilot is offline
Approved Member
 
Join Date: Nov 2011
Location: Brisbane, Australia
Posts: 27
Default

Quote:
Originally Posted by salmo View Post
I can't see a problem with your triggers, it should work
Thanks Salmo, I'll try it again.
Something I did notice today while trying your mission online with some others, when i started the mission we shot the truck and the he 111's didn't spawn. I restarted the mission and it worked. When we tried a third time they didn't spawn again so i restarted again and it worked. So it seems that perhaps it's not loading properly everytime.
Do you know what CLOD requires in regard to interent speed to host a stable session? I know RoF is pretty demanding, I can't host that. My internet is with Telstra, their ultimate 3.0 cable which gives me 117 mbps download and 2.40 mbps upload, which is pretty damn good for Oz. Can't wait for the fibre to be run. I was hosting and flying from the same game though...if that makes a difference.
Reply With Quote
  #8  
Old 11-24-2012, 11:47 AM
salmo salmo is offline
Approved Member
 
Join Date: Mar 2011
Posts: 632
Default

Quote:
Originally Posted by Aussie Pilot View Post
Thanks Salmo, I'll try it again.
Something I did notice today while trying your mission online with some others, when i started the mission we shot the truck and the he 111's didn't spawn. I restarted the mission and it worked. When we tried a third time they didn't spawn again so i restarted again and it worked. So it seems that perhaps it's not loading properly everytime.
Do you know what CLOD requires in regard to interent speed to host a stable session? I know RoF is pretty demanding, I can't host that. My internet is with Telstra, their ultimate 3.0 cable which gives me 117 mbps download and 2.40 mbps upload, which is pretty damn good for Oz. Can't wait for the fibre to be run. I was hosting and flying from the same game though...if that makes a difference.
You might have found the issue. Multiplayer code is severely crippled. It is possible that the triggers only work intermittently. It may be better to use some C# script to achieve what you want. This will give you a more consistent result.
__________________
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
Reply With Quote
  #9  
Old 11-24-2012, 01:24 PM
superbee15 superbee15 is offline
Registered Member
 
Join Date: Apr 2011
Location: Qld Australia
Posts: 13
Default

Salmo/Kodiak

Been working with AP on this. Tonight I built Training Mission to same concept as AP. i.e. Truck (enemy) beside airfield and on it's 50% destruction, I spawn some He111's.

I combined scipt for Triggers covered by Kodiak in this thread with other script to get rid of used planes.

To check working I placed 2 Spits in mission with target to destroy truck. They do and I get successful spawn of He111's.

However, as soon as I remove Spits from mission and take out the truck myself there are no He111's spawned. I tied this twice to confirm.

Script and also mission file (with Spits still in) attached.

We appreaciate any help.

Regards
Attached Files
File Type: txt Mulitiplayer Test Flight 1.txt (1.7 KB, 1 views)
File Type: txt Mulitiplayer Test Flight 1 Script.txt (1.7 KB, 1 views)

Last edited by superbee15; 11-24-2012 at 01:28 PM.
Reply With Quote
Reply


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 07:30 PM.


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