"Walking and talking" effect help...

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
Taters
Regular
Posts: 29
Joined: Sat Nov 11, 2006 8:29 pm
Contact:

"Walking and talking" effect help...

#1 Post by Taters »

*delurks*

Ok, the effect I'm talking about is basically this --> http://www.youtube.com/watch?v=GBh2eP7i1mE (WARNING: Video contains tiny spoilers from "Ef-the first tale".)

I'm able to get the scrolling background and the character bouncing up and down like she's walking using "Move", but I can't seem to be able to change her facial expressions without stopping and restarting the "walking" animation. Any ideas?

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: "Walking and talking" effect help...

#2 Post by PyTom »

For your Move command, give it the argument anim_timebase=True.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Guest

Re: "Walking and talking" effect help...

#3 Post by Guest »

Hmm... I think I might be going about this all wrong... Right now my code looks like this. (Please excuse the subject matter :wink: )

Code: Select all

   scene gray
    show hooker1 at Move((0.3, 1.0, 0.0, 1.0),(0.3, 1.0, 0.0, 0.95), 2.0,repeat=True, bounce=True, anim_timebase=True)
    test "Look at me walk!"
    hide hooker1
    
    show hooker2 at Move((0.3, 1.0, 0.0, 1.0),(0.3, 1.0, 0.0, 0.95), 2.0,repeat=True, bounce=True, anim_timebase=True)
    test "It's like I'm working the streets or something!"
Right now, I have to put move on every different version of "hooker" otherwise the new image appears in the center of the screen, completely still. I also have to hide previous versions of "hooker" or it looks like there's multiple versions hookers stalking her. :shock: As a result, everytime I switch the facial expressions on "hooker", the walking animation jumps back to it's start position.

Is there maybe a way so I can change the facial expressions without getting that strange jumping animation? Like, maybe a way so the face is on a seperate layer but linked to her head which has "move" on it, so the two move together, but I can show and hide the face layers as needed?

Sorry I'm such a nuub....

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: "Walking and talking" effect help...

#4 Post by PyTom »

There's two things you can do. The first is to store the move into a variable, so you don't have to repeat all that code each time. The second thing to do is to break the image names up into two parts--- when two images share the same part, the second one replaces the first.

Code: Select all

init:
    $ walking = Move((0.3, 1.0, 0.0, 1.0),(0.3, 1.0, 0.0, 0.95), 2.0,repeat=True, bounce=True, anim_timebase=True)
    
     image hooker e1 = "hooker_e1.png"
     image hooker e2 = "hooker_e2.png"

label start:
    scene gray

    show hooker e1 at walking
    test "Look at me walk!"
   
    show hooker e2 at walking
    test "It's like I'm working the streets or something!"
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Taters
Regular
Posts: 29
Joined: Sat Nov 11, 2006 8:29 pm
Contact:

Re: "Walking and talking" effect help...

#5 Post by Taters »

Ooh!! Thanks so much!! That makes sense now! I've got it working! *does happy dance*

Post Reply

Who is online

Users browsing this forum: Google [Bot], Tomoyo Ichijouji