Code: Select all
def say_arguments_callback(char, shake_toggle = False, *args, **kwargs):
if shake_toggle:
#<window transform>
kwargs["what_color"] = "#000"
Code: Select all
def say_arguments_callback(char, shake_toggle = False, *args, **kwargs):
if shake_toggle:
#<window transform>
kwargs["what_color"] = "#000"
If you want a shake effect in the say screen, you have to first implement it. This has nothing to do with a callback.kaleidoscopic_kelvin wrote: ↑Sat Feb 03, 2024 5:21 am I want to apply a shake effect to the say window. How do I access the window within the callback code?Thanks in advance!Code: Select all
def say_arguments_callback(char, shake_toggle = False, *args, **kwargs): if shake_toggle: #<window transform> kwargs["what_color"] = "#000"
Code: Select all
default shake_say = False
screen say(who, what):
style_prefix "say"
window:
if shake_say:
at myshake
...
I don't think you can pass non-style-related arguments to the say or bubble screen. A transform is not a kind of style.kaleidoscopic_kelvin wrote: ↑Sun Feb 04, 2024 7:05 am I used the shake as an example. When I try passing a variable to bubble, it doesn't have any effect, but passing to the say screen works. So I needed to find a more general way to manipulate both bubble and say screens. I was able to manipulate the what properties for both say and bubble dialogue types, so now I need to figure out how to access the window stuff from the function
Code: Select all
init python:
def say_arguments_callback(who, interact=True, shake=False):
store.shake_say = shake
return (), { "interact" : interact }
config.say_arguments_callback = say_arguments_callback
label start:
e "Hello, I am Eileen." (shake=True)
return
Users browsing this forum: Ahrefs [Bot]