partially transparent character(solved)

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
glithch
Regular
Posts: 93
Joined: Sat Jul 23, 2016 5:32 am
Contact:

partially transparent character(solved)

#1 Post by glithch »

i want to have a ghost character and i read in the tutorial that making something half transparent is possible with the alpha thingy. but like... how do i actually use it?
i have this

Code: Select all

image w alpha = im.Alpha("red.png", 0.5)
and this

Code: Select all

image w = "red.png"
image w lookaway = "redlookaway.png"
image w calm = "redcalm.png"
image w shy = "redshy.png"
image w smile = "redsmile.png"
image w smile2 = "redsmile2.png"
but the emotions show up as normal transparency even if i write "show w lookaway alpha" or "show w alpha lookaway". do i really have to state every single emotion as alpha?? or am i missing something
Last edited by glithch on Mon Apr 17, 2017 5:22 pm, edited 2 times in total.

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: partially transparent character

#2 Post by xela »

Code: Select all

show w:
    alpha .5
RenPy keeps track of transforms applied to displayable, so make sure you've reset it to alpha 1.0 after you're done with ghosts.
Like what we're doing? Support us at:
Image

glithch
Regular
Posts: 93
Joined: Sat Jul 23, 2016 5:32 am
Contact:

Re: partially transparent character

#3 Post by glithch »

xela wrote:

Code: Select all

show w:
    alpha .5
RenPy keeps track of transforms applied to displayable, so make sure you've reset it to alpha 1.0 after you're done with ghosts.
wait what... sorry i have no idea what does it mean and how to put it into the code and then actually use it : ( im really nooby

User avatar
Scribbles
Miko-Class Veteran
Posts: 636
Joined: Wed Sep 21, 2016 4:15 pm
Completed: Pinewood Island, As We Know It
Projects: In Blood
Organization: Jaime Scribbles Games
Deviantart: breakfastdoodles
itch: scribbles
Location: Ohio
Contact:

Re: partially transparent character(still need help im dumb)

#4 Post by Scribbles »

can you make the image itself somewhat transparent without doing it in Ren'py? (I would use Photoshop and lower the opacity, I'm sure you could do something similar in other programs?)
Image - Image -Image

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: partially transparent character(still need help im dumb)

#5 Post by xela »

You can do that to any image as you show them...

Code: Select all

even if i write "show w lookaway alpha"
You do not define transparent images separately, you write it where you wrote that...

Like:

Code: Select all

label start:
    show w lookaway:
        alpha .5
You do not define:

Code: Select all

image w alpha = im.Alpha("red.png", 0.5)
You just do:

Code: Select all

image w lookaway = "redlookaway.png"
label start:
    show w lookaway:
        alpha .5
I am not sure how to explain it any better, you can always read the same in the Docs.
Like what we're doing? Support us at:
Image

glithch
Regular
Posts: 93
Joined: Sat Jul 23, 2016 5:32 am
Contact:

Re: partially transparent character(still need help im dumb)

#6 Post by glithch »

Scribbles wrote:can you make the image itself somewhat transparent without doing it in Ren'py? (I would use Photoshop and lower the opacity, I'm sure you could do something similar in other programs?)
of course i could do that but it seems counter productive. renpy has the tools to do it so i can do it. and i rather not add more images than i have to, the file is going to be heavy anyway

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3791
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: partially transparent character(still need help im dumb)

#7 Post by Imperf3kt »

The colon means you want to add properties to the image. No need to define the image twice, just do it once and when you show it, specify the properties you need, as shown by xela
Perhaps this helps a bit?
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

glithch
Regular
Posts: 93
Joined: Sat Jul 23, 2016 5:32 am
Contact:

Re: partially transparent character(still need help im dumb)

#8 Post by glithch »

xela wrote:You can do that to any image as you show them...

Code: Select all

even if i write "show w lookaway alpha"
You do not define transparent images separately, you write it where you wrote that...

Like:

Code: Select all

label start:
    show w lookaway:
        alpha .5
You do not define:

Code: Select all

image w alpha = im.Alpha("red.png", 0.5)
You just do:

Code: Select all

image w lookaway = "redlookaway.png"
label start:
    show w lookaway:
        alpha .5
I am not sure how to explain it any better, you can always read the same in the Docs.
oooooh ok ok. i got it. thank you so much
ive been going off of whats written in the script files of the tutorial, maybe that code is just outdated

glithch
Regular
Posts: 93
Joined: Sat Jul 23, 2016 5:32 am
Contact:

Re: partially transparent character(still need help im dumb)

#9 Post by glithch »

Imperf3kt wrote:The colon means you want to add properties to the image. No need to define the image twice, just do it once and when you show it, specify the properties you need, as shown by xela
Perhaps this helps a bit?
yes i get it now. i was trying it out and it works perfectly. thank you all for help :)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], BBN_VN, geoWaffle