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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #27  
Old 09-27-2011, 07:23 PM
Mington Mington is offline
Approved Member
 
Join Date: Apr 2008
Posts: 29
Default

Thanks Kodiak!

Kodiak can you tell us how to get at variables in the maddox dlls please?

I use pseudo-code to give an example-

I imagine something like Airfield.FlakCannon.Temperature

Airfield.FlakCannon.Temperature is a variable and it is 200 (Centigrade)

If Airfield.FlakCannon.Temperature > 199 Then-

HoseDownCannon()

This means- if an airfield flak cannon is getting hot, pour cold water on to the barrel

Can we use get to return the temperature of the flak cannon barrel? Can we use get to return values of variables deep inside the Maddox dlls in running missions?


Coincidentally Kodiak - I am coming here now to say that I have my Hello World thanks to you

And now I can see a trigger working, and I understand that everything will work. I think I am in love with Maddox team

For FMB-nuts

For the script code-

using System;
using maddox.game;
using maddox.game.world;

public class Mission : maddox.game.AMission
{
public override void OnTrigger(int missionNumber, string shortName, bool active)
{
base.OnTrigger(missionNumber, shortName, active);

if ("CrossLake".Equals(shortName) && active)
{
GamePlay.gpHUDLogCenter("Now crossing the lake");
GamePlay.gpGetTrigger(shortName).Enable = false;
}
}
}

This above is Kodiak's code with an identifiable (to me) object to get near, the lake north of Sandwich on the 1940 map. Nothing is happening but if you make small stubs like this you can see things like-

For at least singleplayer missions, missionNumber and shortName do not need to be known... I look at variables and wonder where they are, but for testing purposes some things can remain unknown
____________________________

For the mission text after including Kodiak's script and setting the trigger-

[PARTS]
core.100
bob.100
[MAIN]
MAP Land$English_Channel_1940
BattleArea 150000 100000 100000 150000 1000
TIME 12
WeatherIndex 0
CloudsHeight 1000
BreezeActivity 10
ThermalActivity 10
player BoB_RAF_F_19Sqn_Early.000
[GlobalWind_0]
Power 3.000 0.000 0.000
BottomBound 0.00
TopBound 1500.00
GustPower 5
GustAngle 45
[splines]
[AirGroups]
BoB_RAF_F_19Sqn_Early.01
[BoB_RAF_F_19Sqn_Early.01]
Flight0 1
Class Aircraft.SpitfireMkI
Formation VIC3
CallSign 31
Fuel 100
Weapons 1
Scramble 1
Skill 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3
[BoB_RAF_F_19Sqn_Early.01_Way]
NORMFLY 248451.23 259151.63 500.00 300.00
NORMFLY 246594.30 247927.34 1000.00 300.00
[CustomChiefs]
[Stationary]
[Buildings]
[BuildingsLinks]
[Trigger]
CrossLake TPassThrough 0 247385 252352 1900
________________________________

Observe dear learner-comrade that making an entry in the Edit/script/Triggers code-box creates the [Trigger] entry at the end there ^. The trigger is your Player plane crossing the radius around the lake

For the universal AirfieldEmergency script version, all airfields in the mission must be known, and all must have a detection-radius

Sometimes we RTB, but sometimes we need to land at an Alternate airfield. Sometimes we do not know what airfield we must land at - we only care that we can land our plane and maybe stay alive too

To be more efficient we do not need to cover all airfields, we can emergency-cover airfields in the immediate area - not the area west of London when we are defending ships in the Channel area for example

In Il-2 online campaigns (SEOW) we often land damaged at the nearest airfield and we pray it's a friendly airfield. Imagine if fire engines had come out to meet us. But wait- imagine if it's an enemy airfield and flak-defence spawns...

Ming
Reply With Quote
 

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:05 PM.


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