Oh, and I've forgotten to tell about a hidden feature in the last update (v1.022, as it is known nowadays):
On line #27 in the PyScenario.py file you can found this assignment statement:
Code:
bDisplayDebugMessages = False
By changing this value to True there will be debug messages printed into the Python Debug Log. These might not make much sense to most users, but they would be available anyway.
Note however that doing this will add lag to the game, so don't leave this feature enabled when playing! And if you distribute the application, please leave this value to its default setting!
The things to look out for are these lines:
Code:
PY:Trigger initialized: <PyScenario.Trigger instance at 0x18C7E418>
Because this is a readout of the actual Trigger object and its location in memory. So if you have, say, 10 Trigger constructors in your script and you see 10 of these lines in the log, that means that all of them got loaded into memory!
Also, whenever the game is checking all the Triggers this will appear:
Code:
PY:PyScenario.checkTriggers(): 1, (0,)
The first value is the total number of Triggers that are currently loaded. The second value changes with "game events" and there will sometimes be several values inside the parenthesis (its actually a tuple value).
Furthermore, every single Trigger checked will be reported like this:
Code:
PY:
PyScenario.checkTriggers() Test Trigger
The Trigger label "Test Trigger" is showed in this example, but if none is supplied - then it would look like this:
Code:
PY:
PyScenario.checkTriggers() <PyScenario.Trigger instance at 0x18C7E418>
Note that the memory location ID is the same as on initialization!
Also, this is an example of what is logged when Conditions are checked:
Code:
PY:Conditions.processConditions(): 1
PY:Conditions.processConditions(): <Custom.AlivePlayers instance at 0x2F949468> (1,)
The first line displays the number of Conditions in the Trigger. The second line is an example of an actual Condition instance.
And the Actions:
Code:
PY:Actions.initActions(): 1
PY:<PyScenario.Test instance at 0x18C7E648>