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.
-
fk1995
- Regular
- Posts: 32
- Joined: Sat Nov 17, 2012 3:45 am
-
Contact:
#1
Post
by fk1995 » Wed May 13, 2015 12:31 am
The following code is not seemingly working correctly in Ren'Py 6.99.3, but it works in 6.99.0.299
Code: Select all
label gl(id, filename):
if len(filename.split("|")) == 2:
$filename, mask = filename.split("|")
else:
$mask = ""
python:
try:
persistent.cg[filename] = True
except:
pass
if mask != "":
$pic[id]=im.AlphaMask("pic/"+filename+".png",im.MatrixColor("msk/"+mask+".bmp",im.matrix.invert()))
$renpy.show("pic"+str(id),what = im.AlphaMask("pic/"+filename+".png",im.MatrixColor("msk/"+mask+".bmp",im.matrix.invert())),zorder = 600 - id,at_list=[Transform(alpha=0)])
return
elif filename[:2] == "sg" or filename[:7] =="efcc200":
$pic[id] = im.AlphaMask("pic/"+filename+".png",im.MatrixColor("msk/"+filename+"_msk.bmp",im.matrix.invert()))
$renpy.show("pic"+str(id),what = im.AlphaMask("pic/"+filename+".png",im.MatrixColor("msk/"+filename+"_msk.bmp",im.matrix.invert())),zorder = 600 - id, at_list=[truecenter,Transform(alpha=0)])
return
else:
$pic[id] = Image("pic/"+filename+".png")
$renpy.show("pic"+str(id),what = Image("pic/"+filename+".png"),zorder = 600 - id,at_list=[Transform(alpha=0)])
return
And I used this label like:
Any ideas?
-
PyTom
- Ren'Py Creator
- Posts: 15893
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
-
Contact:
#2
Post
by PyTom » Wed May 13, 2015 9:25 am
What is this code meant to do? What are you expecting, and what are you getting? Do you have a replication of the problem?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama •
https://www.patreon.com/renpytom
-
fk1995
- Regular
- Posts: 32
- Joined: Sat Nov 17, 2012 3:45 am
-
Contact:
#3
Post
by fk1995 » Wed May 13, 2015 2:15 pm
This code simulates a system of indexed images on the screen, so the first parameter is the id of the image and the second parameter is the file name. It has some mask application inside it but I don't think that may cause any bugs. The problem here is that the image does not show up in certain circumstance. I will try to make a simple project to show the bug.
Users browsing this forum: No registered users