I've got a global variable which essentially keeps track of whether or not a character is currently talking. All characters are set to the talking callback and the following code does indeed set the variable, which defaults to False at game start, to True when a character begins talking.
Code: Select all
def talking(event, **kwargs):
global isTalking
if event == "begin":
isTalking = True
elif event == "end":
isTalking = False
However, the variable is never set to False. I'm not entirely sure why the "end" event never seems to be called, but I'm guessing it's something to do with the fact that the "end" event happens when the player dismisses the dialogue, by which time it's immediately set to True at the start of the next say statement.
Code: Select all
def talking(event, **kwargs):
global isTalking
if event == "begin":
isTalking = True
elif event == "slow_done":
isTalking = False
I tried the above workaround, using "slow_done" instead; however, this means the variable is set to False over any {p} pause tag I might have in a say statement, whereas I only want it to be set to False at the very end of every box (like the default CTC behaviour).
Am I right re. the "end" event behaviour? Could anyone offer advice about a potential workaround either with the first example method or the second using "slow_done"?