[HELP] Layered Animation? Line Boil and Blinks

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
GlitchyReal
Newbie
Posts: 17
Joined: Mon Apr 09, 2018 12:28 am
IRC Nick: GlitchyReal
Deviantart: GlitchyReal
Contact:

[HELP] Layered Animation? Line Boil and Blinks

#1 Post by GlitchyReal »

Image

Attached is the desired result of what I'm trying to accomplish currently working just fine in-engine. There are multiple layers (body, eyes, mouth, hair) and each are individually animated with the goal of being able to swap them out as the story calls for it. However, its a HUGE pain to call all these layers individually every time I want them to appear and don't utilize transitions at the same time (as far as I know). I'd like to do something with LayeredImages but I can't figure out how to get animations in there.

I know I could instead render the body/hair/eyes as one animated layer to simplify this, but that would produce a much longer animation to delay blinking all the time while giving me less flexibility and ultimately not solving the problem in the first place.

What I want to be able to do is be able to define something like:

image jui_body:
"/images/characters/jui_body1.png"
"/images/characters/jui_body2.png"
"/images/characters/jui_body3.png"
repeat
image jui_eyes:
"/images/characters/jui_eyes1.png"
"/images/characters/jui_eyes2.png"
"/images/characters/jui_eyes3.png"
repeat
image jui_hair:
"/images/characters/jui_hair1.png"
"/images/characters/jui_hair2.png"
"/images/characters/jui_hair3.png"
repeat

This works, but then I want to do something like... (this code is wrong, I know)

layeredimage jui_neutral:
("jui_body", "jui_eyes", "jui_hair")

define j = Character("jui_neutral")

Essentially, I'm trying to take a bunch of parts, nest them into simpler pieces and call them all at once while also allowing me to use those same parts into different simpler pieces. Does that make sense?

I also have some portions where I want to loop three frames multiple times until introducing a new frame. Example, the line boil (the shaky lines) needs to stay constant for a few seconds and then introduce the blinking animation before returning to the line boil frames. Right now, I just have it copy/pasted a bunch of times and it works but I'm also looking for a way to clean this up.

(I'm also wondering if this is just something Renpy doesn't like to do because it takes a bit to load in a character this way, though it may just be a problem with the resolution and file size being too high.)

Any advice for getting this to work better is welcome, especially if I'm just going about this the wrong way. Please and thank you!

Here's my awful, ugly, cumbersome code I want to simplify.

Code: Select all

#IMPORTANT NAMES
#jui_neutral_nude_body
#jui_neutral_ponytail
#jui_neutral_eyes
#jui_neutral_brows_neutral
#jui_neutral_mouth_grin

#xx_xxxx_xxFLIP

init python:
    def juiL_talk_neutral2(event,**kwargs): #Check callback name below in Jui definition
        if event == "show":
                renpy.music.play(voice_mid_tracks, channel="typewriter")
                renpy.random.shuffle(voice_mid_tracks)
                renpy.show("jui_mouth_neutral_talk") #NEED TO DEFINE IMAGE
                renpy.hide("jui_mouth_neutral_notalk") #NEED TO DEFINE IMAGE
        elif event == "slow_done" or event == "end":
            renpy.show("jui_mouth_neutral_notalk") #NEED TO DEFINE IMAGE
            renpy.hide("jui_mouth_neutral_talk") #NEED TO DEFINE IMAGE
            renpy.music.stop(channel="typewriter")

define jL2 = Character("Jui", window_style="leftwindow", callback=juiL_talk_neutral2, color="#7187D1", ctc="ctc", ctc_position="fixed")


image jui_neutral_nude_body:
    "/images/characters/Jui/Neutral/Body/Nude/01.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Body/Nude/02.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Body/Nude/03.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    repeat


image jui_neutral_ponytail:
    "/images/characters/Jui/Neutral/Hair/Ponytail/01.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Hair/Ponytail/02.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Hair/Ponytail/03.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    repeat

#MOUTH SPRITES
#jui_mouth_neutral_talk
#jui_mouth_neutral_notalk
#jui_mouth_grin_talk
#jui_mouth_grin_notalk <-- rename actual file below
#etc.


image jui_neutral_mouth_grin:
    "images/characters/Jui/Neutral/Mouth/Grin/01.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "images/characters/Jui/Neutral/Mouth/Grin/02.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "images/characters/Jui/Neutral/Mouth/Grin/03.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    repeat

#37 Frames
image jui_neutral_eyes:
    "/images/characters/Jui/Neutral/Eyes/01.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.1
    "/images/characters/Jui/Neutral/Eyes/02.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.1
    "/images/characters/Jui/Neutral/Eyes/03.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.1
    "/images/characters/Jui/Neutral/Eyes/04.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.1
    "/images/characters/Jui/Neutral/Eyes/05.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.1
    "/images/characters/Jui/Neutral/Eyes/06.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.1
    "/images/characters/Jui/Neutral/Eyes/07.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.1

#LINEBOIL x10
    "/images/characters/Jui/Neutral/Eyes/08.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/09.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/10.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/08.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/09.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/10.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/08.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/09.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/10.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/08.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/09.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/10.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/08.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/09.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/10.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/08.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/09.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/10.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/08.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/09.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/10.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/08.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/09.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/10.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/08.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/09.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/10.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/08.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/09.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/10.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/08.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/09.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/10.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
#END LINEBOIL

    repeat

image jui_neutral_brows_neutral:
    "/images/characters/Jui/Neutral/Brows/Neutral/02.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.1
    "/images/characters/Jui/Neutral/Brows/Neutral/03.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.1
    "/images/characters/Jui/Neutral/Brows/Neutral/04.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.1
    "/images/characters/Jui/Neutral/Brows/Neutral/05.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.1
    "/images/characters/Jui/Neutral/Brows/Neutral/06.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.1
    "/images/characters/Jui/Neutral/Brows/Neutral/07.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.1
    "/images/characters/Jui/Neutral/Brows/Neutral/08.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.1

#LINEBOIL x10; -1
    "/images/characters/Jui/Neutral/Brows/Neutral/09.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/10.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/11.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/09.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/10.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/11.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/09.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/10.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/11.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/09.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/10.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/11.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/09.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/10.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/11.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/09.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/10.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/11.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/09.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/10.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/11.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/09.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/10.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/11.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/09.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/10.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/11.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/09.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/10.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/11.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/09.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/10.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
    "/images/characters/Jui/Neutral/Brows/Neutral/11.png"
    zoom 0.4
    xalign -1.2
    yalign 0
    pause 0.15
#END LINEBOIL

    repeat

image jui_neutral_nude_bodyFLIP:
    im.Flip("/images/characters/Jui/Neutral/Body/Nude/01.png", horizontal="True")
    zoom 0.4
    xalign 2.2
    yalign 0
    pause 0.15
    im.Flip("/images/characters/Jui/Neutral/Body/Nude/02.png", horizontal="True")
    zoom 0.4
    xalign 2.2
    yalign 0
    pause 0.15
    im.Flip("/images/characters/Jui/Neutral/Body/Nude/03.png", horizontal="True")
    zoom 0.4
    xalign 2.2
    yalign 0
    pause 0.15
    repeat
#REMEMBER TO COPY AND ADJUST ALL OTHER LAYERS FOR FLIP
I'm a writer first, artist second, and a programmer... somewhere else. (I'm learning!)

Check out my work here!
http://www.DeviantArt.com/GlitchyReal

Support my work here!
http://www.Patreon.com/GlitchyReal

User avatar
GlitchyReal
Newbie
Posts: 17
Joined: Mon Apr 09, 2018 12:28 am
IRC Nick: GlitchyReal
Deviantart: GlitchyReal
Contact:

Re: [HELP] Layered Animation? Line Boil and Blinks

#2 Post by GlitchyReal »

Trying something like this also:

Code: Select all

image jui_body:
    "/images/characters/Jui/Neutral/Body/Nude/01.png"
    "/images/characters/Jui/Neutral/Body/Nude/02.png"
    "/images/characters/Jui/Neutral/Body/Nude/03.png"
    repeat

layeredimage jui_test4:
    group body:
        attribute nude:
            "jui_body"
When I call jui_test4 nude I get an ATL error of being in an infinite loop.

Code: Select all

I'm sorry, but an uncaught exception occurred.

Executing ATL code at game/character_definitions/jui2.rpy:4
  File "game/test3.rpy", line 6, in script
    jL "Hello, what's up?"
Exception: ATL appears to be in an infinite loop.

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/test3.rpy", line 6, in script
    jL "Hello, what's up?"
  File "renpy/ast.py", line 721, in execute
    renpy.exports.say(who, what, *args, **kwargs)
  File "renpy/exports.py", line 1417, in say
    who(what, *args, **kwargs)
  File "renpy/character.py", line 1249, in __call__
    self.do_display(who, what, cb_args=self.cb_args, dtt=dtt, **display_args)
  File "renpy/character.py", line 901, in do_display
    **display_args)
  File "renpy/character.py", line 647, in display_say
    rv = renpy.ui.interact(mouse='say', type=type, roll_forward=roll_forward)
  File "renpy/ui.py", line 298, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "renpy/display/core.py", line 3315, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, pause=pause, pause_start=pause_start, **kwargs)
  File "renpy/display/core.py", line 3834, in interact_core
    self.draw_screen(root_widget, fullscreen_video, (not fullscreen_video) or video_frame_drawn)
  File "renpy/display/core.py", line 2555, in draw_screen
    renpy.config.screen_height,
  File "render.pyx", line 492, in renpy.display.render.render_screen
  File "render.pyx", line 263, in renpy.display.render.render
  File "renpy/display/layout.py", line 824, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 170, in renpy.display.render.render
  File "render.pyx", line 263, in renpy.display.render.render
  File "renpy/display/layout.py", line 824, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 170, in renpy.display.render.render
  File "render.pyx", line 263, in renpy.display.render.render
  File "renpy/display/layout.py", line 824, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 170, in renpy.display.render.render
  File "render.pyx", line 263, in renpy.display.render.render
  File "renpy/display/transform.py", line 733, in render
    return transform_render(self, width, height, st, at)
  File "accelerator.pyx", line 187, in renpy.display.accelerator.transform_render
  File "render.pyx", line 263, in renpy.display.render.render
  File "renpy/display/image.py", line 501, in render
    return wrap_render(self.target, width, height, st, at)
  File "renpy/display/image.py", line 307, in wrap_render
    rend = render(child, w, h, st, at)
  File "render.pyx", line 170, in renpy.display.render.render
  File "render.pyx", line 263, in renpy.display.render.render
  File "renpy/display/layout.py", line 824, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 170, in renpy.display.render.render
  File "render.pyx", line 263, in renpy.display.render.render
  File "renpy/display/image.py", line 501, in render
    return wrap_render(self.target, width, height, st, at)
  File "renpy/display/image.py", line 307, in wrap_render
    rend = render(child, w, h, st, at)
  File "render.pyx", line 170, in renpy.display.render.render
  File "render.pyx", line 263, in renpy.display.render.render
  File "renpy/display/transform.py", line 733, in render
    return transform_render(self, width, height, st, at)
  File "accelerator.pyx", line 148, in renpy.display.accelerator.transform_render
  File "renpy/display/transform.py", line 908, in update_state
    fr = self.execute(self, self.st, self.at)
  File "renpy/atl.py", line 585, in execute
    action, arg, pause = block.execute(trans, timebase, self.atl_state, events)
  File "renpy/atl.py", line 820, in execute
    raise Exception("ATL appears to be in an infinite loop.")
Exception: ATL appears to be in an infinite loop.

Windows-10-10.0.19041
Ren'Py 7.4.10.2178
My Earthly Home 2021 0.2
Wed Mar  2 02:30:58 2022
I'm a writer first, artist second, and a programmer... somewhere else. (I'm learning!)

Check out my work here!
http://www.DeviantArt.com/GlitchyReal

Support my work here!
http://www.Patreon.com/GlitchyReal

User avatar
Syrale
Regular
Posts: 101
Joined: Sun Oct 25, 2015 10:28 am
Completed: Robot Daycare, Deep Sea Valentine, Locke(d)
Projects: Artificial Selection, Artificial Fashionista, rei_carnation
Github: kigyo
itch: kigyo
Discord: kigyodev
Contact:

Re: [HELP] Layered Animation? Line Boil and Blinks

#3 Post by Syrale »

Hey there! Your layeredimage jui_test4 attempt is not too far off, but it's an infinite loop because you didn't add any pauses for the animation.

You can try a basic setup like:

Code: Select all

layeredimage jui:
    always "jui_neutral_nude_body"
    group eyes:
        attribute o default "jui_blink"
        attribute sigh "images/characters/Jui/eyes_closed.png"
        
image jui_blink:
    "images/characters/Jui/eyes.png"
    choice:
        4.5
    choice:
        3.5
    choice:
        1.7
    "images/characters/Jui/eyes2.png"
    .1
    "images/characters/Jui/eyes_closed.png"
    .1
    "images/characters/Jui/eyes2.png"
    .1
    repeat
Going through this in order:
  • Unless there are several nude bodies, I would use always because then you don't have to deal with attributes.
  • The group eyes combines two different kinds of images: The default is open eyes with a blinking animation (defined below) while the other refers to a file directly in the game folder (this would be a still image, not an animation). You can use both methods as you see fit.
Most importantly, if you want to add an animation to layered images, you need to define the animation as a separate image.

You can add or remove as many groups or attribute as you want. This is just a minimal example to show the options you have.
I hope this helps!
ImageArtificial Selection (ongoing) |ImageDeep Sea Valentine | ImageRobot Daycare (NaNo19)
| ImageArtificial Fashionista (NaNo24)

My Developer Tools: Ren'Py Minimap/Location System | Ren'Py Word Counter+

User avatar
GlitchyReal
Newbie
Posts: 17
Joined: Mon Apr 09, 2018 12:28 am
IRC Nick: GlitchyReal
Deviantart: GlitchyReal
Contact:

Re: [HELP] Layered Animation? Line Boil and Blinks

#4 Post by GlitchyReal »

Wow, this is everything I need! Thank you! I may have more questions later, but I think you've given me more than enough to work with. Thanks so very much!

EDIT:
Actually, what does this bit of code do?

Code: Select all

    choice:
        4.5
    choice:
        3.5
    choice:
        1.7
       
I'm also looking to see if there's a way to loop blocks of animation for a set amount of time before playing another.
Basically something like:

Code: Select all

image jui_neutral_eyes_open:
    "/images/characters/Jui/Neutral/Eyes/08.png"
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/09.png"
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/10.png"
    pause 0.15
    
    repeat 10
    
    "/images/characters/Jui/Neutral/Eyes/01.png"
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/02.png"
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/03.png"
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/04.png"
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/05.png"
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/06.png"
    pause 0.15
    "/images/characters/Jui/Neutral/Eyes/07.png"
    pause 0.15
    
    repeat
    
Of course, repeat ends the block so it doesn't work this way.
I'm a writer first, artist second, and a programmer... somewhere else. (I'm learning!)

Check out my work here!
http://www.DeviantArt.com/GlitchyReal

Support my work here!
http://www.Patreon.com/GlitchyReal

User avatar
Syrale
Regular
Posts: 101
Joined: Sun Oct 25, 2015 10:28 am
Completed: Robot Daycare, Deep Sea Valentine, Locke(d)
Projects: Artificial Selection, Artificial Fashionista, rei_carnation
Github: kigyo
itch: kigyo
Discord: kigyodev
Contact:

Re: [HELP] Layered Animation? Line Boil and Blinks

#5 Post by Syrale »

Actually, what does this bit of code do?
Ren'py will always choose only one of the choice blocks, so in this case there's a random pause between blinks (as opposed to a character strictly blinking every 3 seconds).
I'm also looking to see if there's a way to loop blocks of animation for a set amount of time before playing another.
I did not test this, but this could be worth a shot:

Code: Select all

image jui_neutral_eyes_open:
    block:
        "/images/characters/Jui/Neutral/Eyes/08.png"
        pause 0.15
        "/images/characters/Jui/Neutral/Eyes/09.png"
        pause 0.15
        "/images/characters/Jui/Neutral/Eyes/10.png"
        pause 0.15
        repeat 10

    block:
        "/images/characters/Jui/Neutral/Eyes/01.png"
        pause 0.15
        "/images/characters/Jui/Neutral/Eyes/02.png"
        pause 0.15
        "/images/characters/Jui/Neutral/Eyes/03.png"
        pause 0.15
        "/images/characters/Jui/Neutral/Eyes/04.png"
        pause 0.15
        "/images/characters/Jui/Neutral/Eyes/05.png"
        pause 0.15
        "/images/characters/Jui/Neutral/Eyes/06.png"
        pause 0.15
        "/images/characters/Jui/Neutral/Eyes/07.png"
        pause 0.15	
        repeat
(Sorry in advance if it doesn't work!)
ImageArtificial Selection (ongoing) |ImageDeep Sea Valentine | ImageRobot Daycare (NaNo19)
| ImageArtificial Fashionista (NaNo24)

My Developer Tools: Ren'Py Minimap/Location System | Ren'Py Word Counter+

Post Reply

Who is online

Users browsing this forum: Semrush [Bot]