View Single Post
  #1  
Old 10-01-2011, 05:07 AM
dflion dflion is offline
Approved Member
 
Join Date: Nov 2007
Posts: 319
Default III.KG1 Ju88 Campaign Script help request

I have worked out the basic script trigger types for each mission (there are three basic types) - here they are.

Mission 1. 'Group to pass through twice and land at the same airfield' (1 mission)
Missions 2 and 3. 'Group to pass through once and land at different airfield' (2 missions)
Missions 4 to 12. 'Group to pass through twice and land at same airfield' + 'target ground destroyed'. (9 missions)

All missions are to be linked to the next one, with a 'successfully completed' or 'failed' scripting.

My original script is shown below

//$reference Campaign.dll
//-$debug
using System;
using maddox.game;
using maddox.game.world;
using System.Collections.Generic;
using System.Diagnostics; // for Stopwatch timer


public class Mission : maddox.game.campaign.Mission {

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

public override void OnTrigger(int missionNumber, string shortName, bool active) {
if ("trigger01".Equals(shortName) && active) {

AiAction action = GamePlay.gpGetAction(ActorName.Full(missionNumber, "KG1_Ju88_01"));
if (action != null)
action.Do();
action = GamePlay.gpGetAction(ActorName.Full(missionNumber, "KG1_Ju88_02"));
if(action != null)
action.Do();


GamePlay.gpGetTrigger(shortName).Enable = false;
}
}

public override bool IsMissionListener(int missionNumber) {
return true;
}


private void checkLanded(AiAircraft aircraft) {
if (GamePlay.gpPlayer().Place() != aircraft)
return;
GamePlay.gpHUDLogCenter("Press Esc to end mission.");
}

public override void OnAircraftLanded(int missionNumber, string shortName, AiAircraft aircraft) {
checkLanded(aircraft);
}

public override void OnAircraftCrashLanded(int missionNumber, string shortName, AiAircraft aircraft) {
checkLanded(aircraft);
}

}

More campaign mission detail shown below

1. 26th Jun 1940 'Montdidier' -training mission
2. 27th Jun 1940 'Transfer to Rosieres-en-Santerre' - positioning/training flight
3. 2nd Jul 1940 'Caen-Carpiquet' - positioning flight
4. 2nd Jul 1940 'Minelaying' - night first combat mission
5. 3rd Jul 1940 'Ford' - night pattern bombing mission
6. 13th Jul 1940 'We bomb Portsmouth' - day pattern bombing mission
7. 25th Jul 1940 'Convoy Attack' - day dive bombing mission
8. 28th Jul 1940 'The Thames Estuary' - day pattern bombing mission
9. 4th Aug 1940 'Uphavon' -night pattern bombing mission
10. 12th Aug 1940 'Ventor' - day dive bombing mission
11. 30th Aug 1940 'We bomb Biggin Hill' day pattern bombing mission
12. 7th Sep 1940 'The London Docks' day pattern bombing mission



I would really appreciate some help with this from a script writer. Thankyou.

DFLion

Last edited by dflion; 10-01-2011 at 05:19 AM. Reason: adding information
Reply With Quote