I wrote a character callback function following the example listed under https://www.renpy.org/doc/html/character_callbacks.html:
Code: Select all
init python:
import functools
def callbop(event, char, interact=True,**kwargs):
if not interact:
return
if event == "begin" and renpy.showing(char):
renpy.show(char, at_list=[bop])
Code: Select all
define c = Character("Cicada Christie", image="cicada", callback=functools.partial(callbop, char="cicada"))
This function just makes it so that the speaking character bops up and down a little bit.
Now, I would really like to check if the content of the say statement that triggered the callback was something like "..." because I only want them to bop when they actually say words. Ideally, I would like to pass the content of the say statement to the callback as an argument. Is there maybe some clever way to do that? Or if that's not possible, maybe there's another way to access the content of the last say statement? Or maybe, if all else fails, is there a way to change the character callback function on the fly?
Thanks to anyone who takes the time to read this :)