ATL Rotation within Live Composite (Animated Car) [solved]

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
User avatar
ketskari
Veteran
Posts: 290
Joined: Tue Dec 21, 2010 6:22 pm
Completed: Asher, Sunrise, Tell a Demon
Projects: Asher Remake, TEoA
Organization: Sun Labyrinth
Tumblr: sunlabyrinth
Deviantart: sunlabyrinth
itch: sunlabyrinth
Contact:

ATL Rotation within Live Composite (Animated Car) [solved]

#1 Post by ketskari » Tue Jan 14, 2014 10:13 pm

So I have some wheels:

Code: Select all

    image wheelcw:
        "car/wheel.png"
        linear 3.0 rotate 360
        repeat

    image wheelcw2:
        "car/wheel2.png"
        linear 3.0 rotate 360
        repeat
And a Live Composite of a car:

Code: Select all

    image car for = LiveComposite(
            (797, 492),
            (0,0), "car/base.png",
            (565, 265), "wheelcw",
            (-35, 265), "wheelcw2",
            )
The wheels animate, but only once. As in... once in the whole game. Even if I go back to the main menu and start again, the wheels will just stay still as the car slides across the screen.

Is there a way to fix this? Or a better way to do this?

Thanks very much in advance. :)
Last edited by ketskari on Wed Jan 15, 2014 5:43 pm, edited 1 time in total.

Crazy Li
Regular
Posts: 113
Joined: Fri Jan 03, 2014 3:35 pm
Contact:

Re: ATL Rotation within Live Composite (Animated Car)

#2 Post by Crazy Li » Wed Jan 15, 2014 2:50 am

Are your wheels defined after the car? Not sure if this makes a difference, but that's how I've seen LiveComposite examples done before. You would basically do the first code you showed below the second one.

User avatar
ketskari
Veteran
Posts: 290
Joined: Tue Dec 21, 2010 6:22 pm
Completed: Asher, Sunrise, Tell a Demon
Projects: Asher Remake, TEoA
Organization: Sun Labyrinth
Tumblr: sunlabyrinth
Deviantart: sunlabyrinth
itch: sunlabyrinth
Contact:

Re: ATL Rotation within Live Composite (Animated Car)

#3 Post by ketskari » Wed Jan 15, 2014 11:41 am

Moved the code around, but it made no difference, unfortunately.

Crazy Li
Regular
Posts: 113
Joined: Fri Jan 03, 2014 3:35 pm
Contact:

Re: ATL Rotation within Live Composite (Animated Car)

#4 Post by Crazy Li » Wed Jan 15, 2014 2:02 pm

Hmm... can you give me the images you're using so I can fiddle with this myself and see if I can get it to work?

User avatar
ketskari
Veteran
Posts: 290
Joined: Tue Dec 21, 2010 6:22 pm
Completed: Asher, Sunrise, Tell a Demon
Projects: Asher Remake, TEoA
Organization: Sun Labyrinth
Tumblr: sunlabyrinth
Deviantart: sunlabyrinth
itch: sunlabyrinth
Contact:

Re: ATL Rotation within Live Composite (Animated Car)

#5 Post by ketskari » Wed Jan 15, 2014 2:24 pm

Here are the car graphics and the .rpy file with what I have currently.

Thanks. :)
Attachments
car.zip
(45.94 KiB) Downloaded 41 times

Kinsman
Regular
Posts: 130
Joined: Sun Jul 26, 2009 7:07 pm
Location: Fredericton, NB, Canada
Contact:

Re: ATL Rotation within Live Composite (Animated Car)

#6 Post by Kinsman » Wed Jan 15, 2014 5:24 pm

Got it. Change the wheel code to this:

Code: Select all

    image wheelcw:
        "car/wheel.png"
        rotate_pad True
        rotate 0
        linear 3.0 rotate 360
        repeat
What's happening is that when it's time for the second runthrough of the ATL, the wheel's rotation is already at 360, so it doesn't need to rotate any more.
Flash To Ren'Py Exporter
See the Cookbook thread

User avatar
ketskari
Veteran
Posts: 290
Joined: Tue Dec 21, 2010 6:22 pm
Completed: Asher, Sunrise, Tell a Demon
Projects: Asher Remake, TEoA
Organization: Sun Labyrinth
Tumblr: sunlabyrinth
Deviantart: sunlabyrinth
itch: sunlabyrinth
Contact:

Re: ATL Rotation within Live Composite (Animated Car)

#7 Post by ketskari » Wed Jan 15, 2014 5:42 pm

Kinsman wrote:What's happening is that when it's time for the second runthrough of the ATL, the wheel's rotation is already at 360, so it doesn't need to rotate any more.

Well that's an embarrassingly simple solution.

Thank you!

Post Reply

Who is online

Users browsing this forum: Google [Bot]