[solved] Character emotion reset

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
Kaen
Regular
Posts: 148
Joined: Tue Oct 16, 2012 10:49 pm
Contact:

[solved] Character emotion reset

#1 Post by Kaen »

I'd like to know if there is a simple way to keep your character instance, like eileen happy, when there is a new scene, without the need to tell it's happy what I want.

I hope it doesn't sounds too much confusing.

I'm doing a game where characters can change clothes and it's quite troublesome to control it everytime I need to do a new scene.

I was hoping it was possible that if on the last scene Eileen was eileen blueDress, on the next scene if I just call eileen she'd be eileen blueDress because that was her last instance.

Sugestions anyone?
Last edited by Kaen on Mon Jun 23, 2014 8:09 pm, edited 1 time in total.

User avatar
xavimat
Eileen-Class Veteran
Posts: 1461
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Discord: xavimat
Contact:

Re: Character emotion reset

#2 Post by xavimat »

Yes.
You can use Dynamic Displayables (http://www.renpy.org/doc/html/displayab ... splayables)

An example. The image is defined with Conditions:

Code: Select all

image cecile happy = ConditionSwitch(
    "ceci == 'sport'", "cecile_sport_happy.png",
    "ceci == 'blue'", "cecile_blue_happy.png")
When the conditions change, the image changes automatically:

Code: Select all

    $ ceci = 'blue'
    show cecile happy
    c "You've created a new Ren'Py game."
    $ ceci = 'sport'
    c "Once you add a story, pictures, and music, you can release it to the world!"
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

User avatar
Kaen
Regular
Posts: 148
Joined: Tue Oct 16, 2012 10:49 pm
Contact:

Re: Character emotion reset

#3 Post by Kaen »

Thank you very much I'll try this!

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Imperf3kt