Bridge Commander Central

BC Forums => BC Scripting => Topic started by: JimmyB76 on June 13, 2019, 11:01:12 PM

Title: QB starting at Red Alert?
Post by: JimmyB76 on June 13, 2019, 11:01:12 PM
a KM install has it such that when loading a QB match, the match begins at Green Alert, so you have to manually go to Red Alert...

no a custom build (also in BCSP) QB begins at Red Alert...

what script and where needs to be changed in a custom build such that QB starts at Green Alert?

i remember having done this before but i can't exactly rememeber now...

Title: Re: QB starting at Red Alert?
Post by: KrrKs on June 15, 2019, 12:15:55 PM
That should be controlled by scripts\QuickBattle\QuickBattle.py

There is a function called 'StartSimulation2' that includes the following lines near the end:
Code: [Select]
# Switch us to red alert
pAlertEvent = App.TGIntEvent_Create()
pAlertEvent.SetDestination(App.Game_GetCurrentGame().GetPlayer())
pAlertEvent.SetEventType(App.ET_SET_ALERT_LEVEL)
pAlertEvent.SetInt(App.Game_GetCurrentGame().GetPlayer().RED_ALERT)
App.g_kEventManager.AddEvent(pAlertEvent)

These are uncommented in KM.

In the SDK/ original file, these are at lines 3133 and following.
In the KM based script they are at lines 2639 and following.
Title: Re: QB starting at Red Alert?
Post by: JimmyB76 on June 15, 2019, 02:09:08 PM
aaaaaah right on - that looks familair lol
thank you :)