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.
-
Ocelot
- Eileen-Class Veteran
- Posts: 1883
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
-
Contact:
#1
Post
by Ocelot » Sun Oct 23, 2016 2:16 pm
In one place I have a generic code to handle meeting with characters:
Code: Select all
# calculate image path depending on character met, mood, etc.
# $ image_path = ...
show expression image_path as character_met at right with easeinleft
# bunch of code handling greeting, menus, etc. Everyting uses character_met tag to display sprites
# one potential path:
# $ label_string = ...
call expression label_string
# more code
hide character_met with moveoutleft
The problem is that calling label_string will bring us to character-specific event which uses character sprites directly, so they would not replace sprites already on screen. I will need to display exactly same sprite when event returns, so I cannot just do
hide character_met
I could add
as character_met to each show statement in events, but you can enter some events from other places, so this will lead to other problems.
I am interested: is there a way to hide image with specific tag and later restore it?
< < insert Rick Cook quote here > >
Users browsing this forum: No registered users