Author Topic: QB starting at Red Alert?  (Read 596 times)

Offline JimmyB76

  • Posts: 6423
  • Cookies: 421
QB starting at Red Alert?
« 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...


Offline KrrKs

  • Posts: 461
  • Cookies: 25
Re: QB starting at Red Alert?
« Reply #1 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.

Offline JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: QB starting at Red Alert?
« Reply #2 on: June 15, 2019, 02:09:08 PM »
aaaaaah right on - that looks familair lol
thank you :)