[SOLVED]help needed time duration on flipping character sprites

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
thomas_oak
Newbie
Posts: 19
Joined: Thu Oct 24, 2019 11:28 am
Contact:

[SOLVED]help needed time duration on flipping character sprites

#1 Post by thomas_oak »

I am trying to work out how to transition a character sprite when flipping from one direction to another to take say 0.5 seconds instead of instantly. I use this to flip

Code: Select all

transform xflip:
     xzoom -1
then

Code: Select all

    show eileen at xflip
I am sure it is glaringly simple, but the three ways i have tried are either ignored or throw up errors.

Many thanks
Last edited by thomas_oak on Fri Oct 25, 2019 5:38 am, edited 1 time in total.

User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Re: help needed time duration on flipping character sprites

#2 Post by isobellesophia »

Maybe pauses works?

Code: Select all

with pause
or

Code: Select all

$ renpy.pause(1.0, hard=True)
I am a friendly user, please respect and have a good day.


Image

Image


thomas_oak
Newbie
Posts: 19
Joined: Thu Oct 24, 2019 11:28 am
Contact:

Re: help needed time duration on flipping character sprites

#3 Post by thomas_oak »

Oh maybe I didn't explain it well enough. I want the character sprite to take time in the actual flip, so it looks like it is rotating. I have seen it used often in other people's games.

User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Re: help needed time duration on flipping character sprites

#4 Post by isobellesophia »

thomas_oak wrote: Thu Oct 24, 2019 12:08 pm Oh maybe I didn't explain it well enough. I want the character sprite to take time in the actual flip, so it looks like it is rotating. I have seen it used often in other people's games.
Maybe you can take a look at this.

https://www.renpy.org/doc/html/atl.html#warpers

It said it has like a time on in transforms on it, it may help you.


(Basically dont know about ATL's.)
I am a friendly user, please respect and have a good day.


Image

Image


+ ali3nn +
Regular
Posts: 32
Joined: Wed Aug 14, 2019 3:08 pm
Contact:

Re: help needed time duration on flipping character sprites

#5 Post by + ali3nn + »

thomas_oak wrote: Thu Oct 24, 2019 11:55 am I am trying to work out how to transition a character sprite when flipping from one direction to another to take say 0.5 seconds instead of instantly. I use this to flip

Code: Select all

transform xflip:
     xzoom -1
then

Code: Select all

    show eileen at xflip
I am sure it is glaringly simple, but the three ways i have tried are either ignored or throw up errors.

Many thanks
you can find this in the documentation: https://www.renpy.org/doc/html/displaya ... ml#im.Flip

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: help needed time duration on flipping character sprites

#6 Post by Remix »

Code: Select all

transform xflip(duration=0.5):
    xzoom 1.0
    linear duration xzoom -1.0
Frameworks & Scriptlets:

thomas_oak
Newbie
Posts: 19
Joined: Thu Oct 24, 2019 11:28 am
Contact:

Re: help needed time duration on flipping character sprites

#7 Post by thomas_oak »

Many thanks Remix. That was exactly what I was looking for. :D

Post Reply

Who is online

Users browsing this forum: Google [Bot]