How to hide images without using hide statement?

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
DNAniel213
Regular
Posts: 33
Joined: Tue May 27, 2014 1:49 am
Completed: None.....yet...
Projects: "An Erudite's Heart"
Organization: S.E.R.N.
IRC Nick: DNAniel213
Contact:

How to hide images without using hide statement?

#1 Post by DNAniel213 »

Hey guys! Good....whatevertimeitisatyourplace!

How do I hide images without using the hide statement?

Like:
show LOL at right with dissolve
hide LOL
show LOL1 at left with dissolve
hide LOL1
show LOL2 at left with dissolve
hide LOL2

Put into example that LOL is a sprite and 1 and 2 are different emotions. :D
Thanks!
Reality, Bend
Synapse, Break
Banishment, This World!

Asceai
Eileen-Class Veteran
Posts: 1258
Joined: Fri Sep 21, 2007 7:13 am
Projects: a battle engine
Contact:

Re: How to hide images without using hide statement?

#2 Post by Asceai »

By giving them different names

Instead of calling your other expressions LOL1 and LOL2 call them LOL A and LOL B (I dunno if you can have just a number as part of a name- otherwise LOL 1 and LOL 2)

image LOL = "lol.png"
image LOL A = "lol1.png"
image LOL B = "lol2.png"

This way you can show LOL A and it will hide LOL, and so on.

Then you can just:
show LOL at right with dissolve
"..."
show LOL A at left with dissolve
"..."
show LOL B at left with dissolve

Here's the relevant part of the quickstart
The first part of an image name is the image tag. If an image is being shown, and another image with the same tag is on the screen, then the image that's on the screen is replaced with the one being shown.

User avatar
DNAniel213
Regular
Posts: 33
Joined: Tue May 27, 2014 1:49 am
Completed: None.....yet...
Projects: "An Erudite's Heart"
Organization: S.E.R.N.
IRC Nick: DNAniel213
Contact:

Re: How to hide images without using hide statement?

#3 Post by DNAniel213 »

Wai.... I can't believe I missed this logic.
I can reason out that the quickstart didn't specify this though x) (No,DNAniel. this is your fault)

Thanks a lot!!! :D
Reality, Bend
Synapse, Break
Banishment, This World!

Post Reply

Who is online

Users browsing this forum: Kia