Problem with Side Sprite Dissolve

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
mitoky
Veteran
Posts: 316
Joined: Sat Feb 07, 2015 9:12 pm
Projects: The Purring Demon's Love, circus eterie
Contact:

Problem with Side Sprite Dissolve

#1 Post by mitoky »

Hello!

When coding and testing the side sprite i noticed 2 issues.

1.) The side sprite doesnt dissolves between emotions only but also between every time you advance (means that if the image doenst changes, you notice it dissolves too)
and
2.) When showing an image on screen (like a character changing expression) the side sprite dissolves out and in again. I would like it to imply stay.

What i have so far:

First the defined characters with all having the side image associated with it (so you can change the expression from everywhere:

Code: Select all

define KD = Character("KYUL", who_color="#89002d", image="kyul", what_prefix='"', what_suffix='"')
define KT = Character("KYUL", who_color="#89002d", image="kyul", what_prefix="{i}", what_suffix="{/i}")
define KN = Character(" ", image="kyul")
define Noa = Character ("NOA", who_color="#61818e", image="kyul", what_prefix='"', what_suffix='"')
And then the code for the side sprite's dissolve:

Code: Select all

## Adds Dissolve to Side Image
transform change_transform(old, new):
    contains:
        old
        alpha 1.0
        linear 0.5 alpha 0.0
    contains:
        new
        alpha 0.0
        linear 0.5 alpha 1.0

transform same_transform(old, new):
    old
    new with Dissolve(0.5, alpha=True)

define config.side_image_change_transform = change_transform
define config.side_image_same_transform = same_transform

## Shows Side Image Always
init python:
    config.side_image_tag = "kyul"
Any help is appreticiated!

Post Reply

Who is online

Users browsing this forum: Kocker