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