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.
-
thery
- Newbie
- Posts: 1
- Joined: Mon Aug 09, 2021 2:22 pm
-
Contact:
#1
Post
by thery » Mon Aug 09, 2021 2:36 pm
Hello!
I am fairly new to ren'py coding (and coding in general) and I have been following Thundorn @
https://www.youtube.com/channel/UC3XOVU ... JNh9OMD8g and his tutorials. I've made a game following his most recent tutorial series and I would like to make some tweaks to the game engine.
So far the game engine allows for travelling to different locations using the map - which is great. But, I want all of the locations to be locked in the map_screen until the player has moved to that location manually. I think that might be the easiest way to describe what I want to happen in the game.
Any and all tips - whether tutorials or code - are most welcome!
Also, if someone knows about a full ren'py game-making-tutorial-series I would be happy to get the link.
Thank you very much!
/Ry
-
hell_oh_world
- Miko-Class Veteran
- Posts: 777
- Joined: Fri Jul 12, 2019 5:21 am
- Projects: The Button Man
- Organization: NILA
- Github: hell-oh-world
- Location: Philippines
-
Contact:
#2
Post
by hell_oh_world » Mon Aug 09, 2021 7:45 pm
you can try to store the conditions in a dict.
Code: Select all
default locations = dict(loc1=False, loc2=False, loc3=False)
then in your label where you want to unlock these, you just do...
Code: Select all
label loc1:
$ locations["loc1"] = True
lastly, you can use these in your screen as a condition.
Code: Select all
screen map():
textbutton "Location 1":
action Jump("loc1")
sensitive locations["loc1"]
-
rayminator
- Miko-Class Veteran
- Posts: 754
- Joined: Fri Feb 09, 2018 12:05 am
- Location: Canada
-
Contact:
#3
Post
by rayminator » Mon Aug 09, 2021 9:34 pm
you can do it this way as well
map code
Code: Select all
screen mapbuttons:
imagebutton xalign 0.3 yalign 0.6:
idle ("images/Buttons/button_home_hover.png")
hover (im.MatrixColor("images/Buttons/button_home_hover.png",im.matrix.brightness(0.10)))
action Call("home")
if mapdorm:
imagebutton xalign 0.5 yalign 0.1:
idle ("images/Buttons/dormitory_i.png")
hover ("images/Buttons/dormitory_h.png")
action Call("dorm")
if mapcollege:
imagebutton xalign 0.7 yalign 0.1:
idle ("images/Buttons/college_idle.png")
hover ("images/Buttons/college_hover.png")
action Call("college")
if mapstore:
imagebutton xalign 0.5 yalign 0.5:
idle ("images/Buttons/store_i.png")
hover ("images/Buttons/store_h.png")
action Call("store")
either you can use init or default
Code: Select all
init:
$ mapcollege = False
$ mapstore = False
$ mapdorm = False
Users browsing this forum: No registered users