[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 » 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
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: 701
Joined: Mon Jan 07, 2019 2:55 am
Projects: Maddox's Everyday Talk! (13+ Unreal version), Maddox Everyday Talk! (3+ Real-Friendly version)(Upcoming 2020)
Organization: Friendly Teachers series
itch: .......
Location: Philippines, Mindanao
Contact:

Re: help needed time duration on flipping character sprites

#2 Post by isobellesophia » Thu Oct 24, 2019 12:04 pm

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..


Working on a talking simulation game for everyone, except children.

Maddox Everyday Talk!
Is my very very main project, not contain 13 below.

Main project here viewtopic.php?f=43&t=56564
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 » 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.

User avatar
isobellesophia
Miko-Class Veteran
Posts: 701
Joined: Mon Jan 07, 2019 2:55 am
Projects: Maddox's Everyday Talk! (13+ Unreal version), Maddox Everyday Talk! (3+ Real-Friendly version)(Upcoming 2020)
Organization: Friendly Teachers series
itch: .......
Location: Philippines, Mindanao
Contact:

Re: help needed time duration on flipping character sprites

#4 Post by isobellesophia » Thu Oct 24, 2019 12:18 pm

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..


Working on a talking simulation game for everyone, except children.

Maddox Everyday Talk!
Is my very very main project, not contain 13 below.

Main project here viewtopic.php?f=43&t=56564
Image

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

Re: help needed time duration on flipping character sprites

#5 Post by + ali3nn + » Thu Oct 24, 2019 2:07 pm

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
sorry, projects are on hiatus.

User avatar
Remix
Eileen-Class Veteran
Posts: 1314
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 » Thu Oct 24, 2019 8:06 pm

Code: Select all

transform xflip(duration=0.5):
    xzoom 1.0
    linear duration xzoom -1.0
Mad Scientist Todo List:
  • Finish Improved Event Handler
  • Implement DragonBones animation as a Creator Defined Container
  • Develop Cartoon Speech Bubble dialogue
  • Finish Bitmask collision and rebound vector system
  • Develop time based building mechanic
  • Others
  • *Find a superb artist and actually write a game*

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 » Fri Oct 25, 2019 5:37 am

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

Post Reply

Who is online

Users browsing this forum: Google [Bot]