image nodding

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
dott.Piergiorgio
Veteran
Posts: 345
Joined: Sun May 18, 2008 1:52 pm
Contact:

image nodding

#1 Post by dott.Piergiorgio »

I'm not 100% sure if I can explain well my coding problem:

I want the image of the char doing a small traslation down then back up, representing an acknowledge nodding (also, a more marked traslation down/up representing a bowing) but my tests fails, with sylvie (the most abused actress in Ren'py history, perhaps...) remaining firm, but the traslation along X axis works as advertised in documentation.

thing that is,

Code: Select all

transform left_to_right:
    xalign 0.0
    linear 2.0 yalign 1.0
    repeat
works, but the simple reverting:

Code: Select all

transform left_to_right:
    yalign 0.0
    linear 0.1 xalign 1.0
    repeat
don't work.. I'm missing something ?

Best regards from Italy,
dott. Piergiorgio.

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: image nodding

#2 Post by Alex »

Mmm, try

Code: Select all

image test_im = "eileen_vhappy.png"
define e = Character('Eileen', color="#c8ffc8")

transform nod:
    yoffset 0
    linear 0.2 yoffset 50
    linear 0.2 yoffset 0

# The game starts here.
label start:
    show test_im
    "ok?"
    show test_im at nod
    e "yes."
    "?"
(Eileen is more willing, lol).

SundownKid
Lemma-Class Veteran
Posts: 2299
Joined: Mon Feb 06, 2012 9:50 pm
Completed: Icebound, Selenon Rising Ep. 1-2
Projects: Selenon Rising Ep. 3-4
Organization: Fastermind Games
Deviantart: sundownkid
Location: NYC
Contact:

Re: image nodding

#3 Post by SundownKid »

You have "xalign" there instead of "yalign". Perhaps that typo is causing the issue?

I would probably do something like:

Code: Select all

transform bow:
   ease 0.5 yalign 1.1
   ease 0.5 yalign 1.0

dott.Piergiorgio
Veteran
Posts: 345
Joined: Sun May 18, 2008 1:52 pm
Contact:

Re: image nodding

#4 Post by dott.Piergiorgio »

Thanks to both of you; alex's solution works (albeit for me is a "bow", but it's a case of YMMV) but that sundownkid's don't work (yea, there was a typo in my post, but I wasn't cut'n pasting, but working by hand) and I'm mulling on this work/don't work... I feel that the issue lies in yalign.

Best regards from Italy,
dott. Piergiorgio.

User avatar
meiri
Regular
Posts: 177
Joined: Wed Jun 25, 2014 6:21 pm
Projects: Tutor Tabitha, Movement
Organization: Blue Bottlecap Games
Location: East Coast, US
Contact:

Re: image nodding

#5 Post by meiri »

So, to clarify, if I need an image to go offscreen in x or y direction, I have to use yoffset or xoffset? Negative values for xalign/yalign or xpos/ypos will not work?
What's in a loop? A loop iterated in any other way would output as sweet.
--
Have a look at my GxG kinetic novel, Movement, if you have the chance?

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: image nodding

#6 Post by Alex »

You can use different positional properties to place your images onscreen - http://www.renpy.org/doc/html/style_pro ... properties
xoffset and yoffset are just set the distance in pixels where the image should be moved from it's current position.

Post Reply

Who is online

Users browsing this forum: No registered users