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 03-15-2012, 09:06 PM
bolox bolox is offline
Approved Member
 
Join Date: May 2008
Posts: 351
Default A little fun?

a quick, hopefully fun 'slalom race' offline mission with a timer and 'gate passing' script.



http://www.mediafire.com/download.php?2itdv8u9sclio7b

script
Code:
using System;
using System.Collections;
using System.Collections.Generic;
using maddox.game;
using maddox.game.world;
using maddox.GP;
using System.Diagnostics;

public class Mission : AMission{
	Stopwatch missionTimer = new Stopwatch();
		int aa = 0;//trigger count 
		double sw = 0;//stopwatch
		double se = 0;//stopwatch calculated
	 public override void OnBattleStarted() {
        base.OnBattleStarted();
		missionTimer.Start();
    }
    public override void OnTrigger(int missionNumber, string shortName, bool active) {
        if ("start".Equals(shortName) && active) {
		aa = 0;
		missionTimer.Restart();
		{
		GamePlay.gpHUDLogCenter("GO");//start
		}
		}
		if ("b".Equals(shortName) && active) {//gate 1
		++aa;
		{GamePlay.gpHUDLogCenter("1");
		}
		}
		if ("c".Equals(shortName) && active) {//gate2
		++aa;
		{GamePlay.gpHUDLogCenter("2");
		}
		}
		if ("d".Equals(shortName) && active) {//gate 3
		++aa;
		{GamePlay.gpHUDLogCenter("3");
		}
		}
		if ("e".Equals(shortName) && active) {//gate 4
		++aa;
		{GamePlay.gpHUDLogCenter("4");
		}
		}
		 if ("finish".Equals(shortName) && active) {	//finish
		missionTimer.Stop();
		double initTime = 0.0;
		 sw = missionTimer.Elapsed.TotalMilliseconds;
		 se = sw/1000;{
		GamePlay.gpHUDLogCenter("TIME:"+se);
		Timeout(initTime += 5.0, () =>
		{
		GamePlay.gpHUDLogCenter("GATES:"+aa);
		});
		}
		}
	}
  }
very simple airstart mission that's a 'proof of concept' but might be an idea for something a bit different?
Reply With Quote
  #2  
Old 03-15-2012, 10:04 PM
_79_dev _79_dev is offline
Approved Member
 
Join Date: Sep 2010
Location: Dublin
Posts: 242
Default

I like that Idea mate...
__________________

Asus P6T V2 Deluxe, I7 930, 3x2 GB RAM XMS3 Corsair1333 Mhz, Nvidia Leadtek GTX 470, Acer 1260p screen projector, Track IR 4 OS ver5, Saitek Pro Flight Rudder, Saitek X52, Win 7 x64 ultimate
Reply With Quote
  #3  
Old 03-15-2012, 10:43 PM
ATAG_Doc ATAG_Doc is offline
Approved Member
 
Join Date: May 2010
Location: A brothel in the Mekong Delta
Posts: 1,546
Default

Haha cool.
Reply With Quote
  #4  
Old 03-16-2012, 03:56 AM
hc_wolf hc_wolf is offline
Approved Member
 
Join Date: Jul 2010
Posts: 439
Default

Dude! that is a bit of fun

That code will come in handy for something I am sure.

RED BULL RACING HERE WE COME!!!
__________________
__________________
Win7, 64bit Ultra
Asus P8P67Pro MB
Intel i7-2600K
Coursair 16GB (4x 4GB), DDR3-1600MHz
Gainward Nvidia 580GTX 3GB DDR5
850-Watt Modular Power Supply
WIN7 and COD on Gskill SSD 240GB
40" Panasonic LCD
TrackIR5 +
Thrustmaster Warthog stick, throttle & pedals
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 02:56 AM.


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