Page 1 of 1

How to move say box programmatically

Posted: Thu Jul 29, 2021 7:49 am
by RewindTheGame
Hello,

I know this is probably a simple thing but it's been driving me nuts. What I want to do is have my say screen appear at different places on the screen depending on the contents of the who parameter. So if the who parameter is "nobody" then the say text will appear 50 pixels from the top of the screen, but if the who parameter is anything else then it appears 50 pixels from the bottom of the screen. I can't work out how to do this.

In any other computer language, you'd just say something like:

style say_dialogue:
if who != "nobody":
ypos gui.dialogue_ypos+50
else:
ypos 50

but that doesn't work because I suppose you can't use IF in styles, so I'm at a loss how to do it. Help!

I mean, this would generally be important as well to move the say screen depending on the graphic behind it, so that it doesn't cover something important.

TIA,
Simon

Re: How to move say box programmatically

Posted: Thu Jul 29, 2021 9:00 am
by hell_oh_world
try...

Code: Select all

define nobody = Character("Nobody", window_ypos=50)

Re: How to move say box programmatically

Posted: Thu Jul 29, 2021 12:16 pm
by RewindTheGame
Thank you very much, that's a lot easier than the convoluted solution I came up with about an hour ago :)