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.
-
eath
- Newbie
- Posts: 10
- Joined: Tue Jul 14, 2020 11:52 am
-
Contact:
#1
Post
by eath » Thu Jul 23, 2020 10:13 am
I'm at a loss after trying to build this for several days. Experts, please point out my error?
Code: Select all
screen inv_grid:
hbox:
xalign .5 # center generally
# tried grid and vpgrid
# vpgrid:
# cols num_columns
for i in range(4): # or whatever
hbox:
python:
tag = "slot_{}".format(i)
if not renpy.get_screen(tag): # I think this means if it can't find this screen, then:
renpy.use_screen("inv_slot", tag=tag) # make new screen. can't use show_screen, shows nothing
screen inv_slot(tag):
tag tag # getting desperate
hbox:
xalign .5
# at inv_animation
imagebutton:
focus_mask True
idle "item.png"
action [Hide("tag"), Play("sound","click.wav")] # click plays sound, does not hide
label start:
scene bg uni
show screen inv_grid
pause
"You've created a new Ren'Py game."
Tags are still a mystery to me, their documentation is sparse AFAICT. And I can't Google the forum for threads on it because every single indexed page contains the phrase "Use the code tag to format scripts." I can't disallow that search phrase because again, every single page...
My thanks to the people on this board who have patiently helped a noob get this far.
-
Andredron
- Miko-Class Veteran
- Posts: 535
- Joined: Thu Dec 28, 2017 2:37 pm
- Completed: Kimi ga nozomu renpy-port(demo), Albatross Koukairoku(demo)
- Projects: Sisters ~Natsu no Saigo no Hi~(renpy-port)
- Location: Russia
-
Contact:
#2
Post
by Andredron » Fri Jul 24, 2020 12:33 pm
???
screen hide?
Code: Select all
textbutton _("buter"):
text_size 50
text_idle_color "6666ff"
text_hover_color "ffffff"
text_outlines [ (absolute(1), "#333333", absolute(1), absolute(1)) ]
action [ShowMenu("save"), Hide("main_menu")]### Hide("main_menu")
Users browsing this forum: Bing [Bot], span4ev