Simplifying transform code
Posted: Sun Sep 26, 2021 9:48 pm
Hey, so I made a specific transform that acts the type of transition I want to use for my displayables. The problem is, whenever I take the sprites off the screen, I'm finding that I have to type pause 0.3 every single time I take a sprite off the screen to give the transform time to play. So you can see, let me show you an example of what the coding looks like:
And here are my transform definitions:
It's suuuuper cumbersome. The biggest thing I'd like to be able to get rid of is the pause 0.3. However, bonus points if I could add the dis transition (which is short for dissolve) to part of the transform as well, and BONUS bonus points if I could maybe even make an animation for each sprite or something? and every time I say "show amalia" it automatically shows her with the inright transform and every time I say "hide amalia" or "show amalia out" or something, it shows her with the outright transition.
Anyway, if someone could help me shorten this a little bit and make it more automated, that would be great. Idk if I can stand coding a whole book with this cumbersome mess lol
Code: Select all
show amalia at inright with dis
amalia_s "So, are we looking for anything in particular?" with dis
show amalia at outright
pause 0.3
show rowan at inleft with dis
rowan_s "I think I'll know it when I see it." with dis
show rowan at outleft
pause 0.3
show amalia at inright with dis
amalia_s "That's a little ominous coming from you." with dis
show amalia at outright
pause 0.3
show rowan at inleft with dis
rowan_s "Just go read a book or something." with dis
show rowan at outleft
pause 0.3
And here are my transform definitions:
Code: Select all
transform inleft():
offscreenleft
zoom 0.1
anchor (1.0, 0.5)
pos (0.0, 0.5)
ease 0.15 zoom 0.3 align (0.0, 0.75)
ease 0.1 zoom 1.0 align (0.0, 1.0)
transform inright():
offscreenright
zoom 0.1
anchor (0.0, 0.5)
pos (1.0, 0.5)
ease 0.15 zoom 0.3 align (0.8, 0.75)
ease 0.1 zoom 1.0 align (0.6, 1.0)
transform outleft():
zoom 1.0
ease 0.25 offscreenleft zoom 0.1
transform outright():
zoom 1.0
ease 0.25 offscreenright zoom 0.1
Anyway, if someone could help me shorten this a little bit and make it more automated, that would be great. Idk if I can stand coding a whole book with this cumbersome mess lol