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.
-
zabuzaeldemonio
- Regular
- Posts: 100
- Joined: Sun Jan 08, 2017 7:24 pm
- Projects: Call Me
- Location: Spain
-
Contact:
#1
Post
by zabuzaeldemonio » Thu Sep 26, 2019 4:18 pm
Greetings, I am doing an in-game guide. It is a visual guide that marks the way with circles (very similar to that of School days). The problem is that I don't know how to make the path that the player follows. I have thought about making a variable counter, but in that case it would affect all routes. Any ideas ?
Here you have a visual example.
https://ibb.co/QpxXWwv
And here my code to show that (but with issues)
Code: Select all
screen guia2:
add "gui/guia/rute1.jpg"
## ■██▓▒░ Primer camino ░▒▓███████████████████████████████████■
if mecanica >= 1:
imagebutton idle "gui/guia/circulopasado_idle.png" xpos 885 ypos 80 focus_mask True
elif primeroguia:
imagebutton idle "gui/guia/circuloactual_idle.png" xpos 885 ypos 80 focus_mask True
else:
imagebutton idle "gui/guia/circuloneutro_idle.png" xpos 885 ypos 80 focus_mask True
## ■██▓▒░ Primer camino ░▒▓███████████████████████████████████■
## ■██▓▒░ hablas con papa ░▒▓███████████████████████████████████■
if mecanica >= 2:
imagebutton idle "gui/guia/circulopasado_idle.png" xpos 565 ypos 280 focus_mask True
elif hablarpapa:
imagebutton idle "gui/guia/circuloactual_idle.png" xpos 565 ypos 280 focus_mask True
else:
imagebutton idle "gui/guia/circuloneutro_idle.png" xpos 565 ypos 280 focus_mask True
## ■██▓▒░ hablas con papa ░▒▓███████████████████████████████████■
## ■██▓▒░ hablas con hermana ░▒▓███████████████████████████████████■
if mecanica >= 2:
imagebutton idle "gui/guia/circulopasado_idle.png" xpos 1245 ypos 280 focus_mask True
elif hablarhermana:
imagebutton idle "gui/guia/circuloactual_idle.png" xpos 1245 ypos 280 focus_mask True
else:
imagebutton idle "gui/guia/circuloneutro_idle.png" xpos 1245 ypos 280 focus_mask True
## ■██▓▒░ hablas con hermana ░▒▓███████████████████████████████████■
## ■██▓▒░ sales a la calle ░▒▓███████████████████████████████████■
if mecanica == 2:
imagebutton idle "gui/guia/circulopasado_idle.png" xpos 885 ypos 280 focus_mask True
elif tienda:
imagebutton idle "gui/guia/circuloactual_idle.png" xpos 885 ypos 280 focus_mask True
else:
imagebutton idle "gui/guia/circuloneutro_idle.png" xpos 885 ypos 280 focus_mask True
## ■██▓▒░ derecha ░▒▓███████████████████████████████████■
if mecanica >= 3:
imagebutton idle "gui/guia/circulopasado_idle.png" xpos 625 ypos 580 focus_mask True
elif derecha1:
imagebutton idle "gui/guia/circuloactual_idle.png" xpos 625 ypos 580 focus_mask True
else:
imagebutton idle "gui/guia/circuloneutro_idle.png" xpos 625 ypos 580 focus_mask True
## ■██▓▒░ derecha ░▒▓███████████████████████████████████■
## ■██▓▒░ izquierda ░▒▓███████████████████████████████████■
if mecanica >= 3:
imagebutton idle "gui/guia/circulopasado_idle.png" xpos 1185 ypos 580 focus_mask True
elif izquierda1:
imagebutton idle "gui/guia/circuloactual_idle.png" xpos 1185 ypos 580 focus_mask True
else:
imagebutton idle "gui/guia/circuloneutro_idle.png" xpos 1185 ypos 580 focus_mask True
## ■██▓▒░ izquierda ░▒▓███████████████████████████████████■
## ■██▓▒░ sales a la calle ░▒▓███████████████████████████████████■
In this code all works fine, but when the player advance a lot, all the previous circles are gray, and there should only be one gray line, indicating the current path of the player
My personal
Project:

-
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 » Thu Sep 26, 2019 6:04 pm
zabuzaeldemonio wrote: ↑Thu Sep 26, 2019 4:18 pm
Greetings, I am doing an in-game guide. It is a visual guide that marks the way with circles (very similar to that of School days). The problem is that I don't know how to make the path that the player follows. I have thought about making a variable counter, but in that case it would affect all routes. Any ideas ?
Here you have a visual example.
https://ibb.co/QpxXWwv
And here my code to show that (but with issues)
Code: Select all
screen guia2:
add "gui/guia/rute1.jpg"
## ■██▓▒░ Primer camino ░▒▓███████████████████████████████████■
if mecanica >= 1:
imagebutton idle "gui/guia/circulopasado_idle.png" xpos 885 ypos 80 focus_mask True
elif primeroguia:
imagebutton idle "gui/guia/circuloactual_idle.png" xpos 885 ypos 80 focus_mask True
else:
imagebutton idle "gui/guia/circuloneutro_idle.png" xpos 885 ypos 80 focus_mask True
## ■██▓▒░ Primer camino ░▒▓███████████████████████████████████■
## ■██▓▒░ hablas con papa ░▒▓███████████████████████████████████■
if mecanica >= 2:
imagebutton idle "gui/guia/circulopasado_idle.png" xpos 565 ypos 280 focus_mask True
elif hablarpapa:
imagebutton idle "gui/guia/circuloactual_idle.png" xpos 565 ypos 280 focus_mask True
else:
imagebutton idle "gui/guia/circuloneutro_idle.png" xpos 565 ypos 280 focus_mask True
## ■██▓▒░ hablas con papa ░▒▓███████████████████████████████████■
## ■██▓▒░ hablas con hermana ░▒▓███████████████████████████████████■
if mecanica >= 2:
imagebutton idle "gui/guia/circulopasado_idle.png" xpos 1245 ypos 280 focus_mask True
elif hablarhermana:
imagebutton idle "gui/guia/circuloactual_idle.png" xpos 1245 ypos 280 focus_mask True
else:
imagebutton idle "gui/guia/circuloneutro_idle.png" xpos 1245 ypos 280 focus_mask True
## ■██▓▒░ hablas con hermana ░▒▓███████████████████████████████████■
## ■██▓▒░ sales a la calle ░▒▓███████████████████████████████████■
if mecanica == 2:
imagebutton idle "gui/guia/circulopasado_idle.png" xpos 885 ypos 280 focus_mask True
elif tienda:
imagebutton idle "gui/guia/circuloactual_idle.png" xpos 885 ypos 280 focus_mask True
else:
imagebutton idle "gui/guia/circuloneutro_idle.png" xpos 885 ypos 280 focus_mask True
## ■██▓▒░ derecha ░▒▓███████████████████████████████████■
if mecanica >= 3:
imagebutton idle "gui/guia/circulopasado_idle.png" xpos 625 ypos 580 focus_mask True
elif derecha1:
imagebutton idle "gui/guia/circuloactual_idle.png" xpos 625 ypos 580 focus_mask True
else:
imagebutton idle "gui/guia/circuloneutro_idle.png" xpos 625 ypos 580 focus_mask True
## ■██▓▒░ derecha ░▒▓███████████████████████████████████■
## ■██▓▒░ izquierda ░▒▓███████████████████████████████████■
if mecanica >= 3:
imagebutton idle "gui/guia/circulopasado_idle.png" xpos 1185 ypos 580 focus_mask True
elif izquierda1:
imagebutton idle "gui/guia/circuloactual_idle.png" xpos 1185 ypos 580 focus_mask True
else:
imagebutton idle "gui/guia/circuloneutro_idle.png" xpos 1185 ypos 580 focus_mask True
## ■██▓▒░ izquierda ░▒▓███████████████████████████████████■
## ■██▓▒░ sales a la calle ░▒▓███████████████████████████████████■
In this code all works fine, but when the player advance a lot, all the previous circles are gray, and there should only be one gray line, indicating the current path of the player
What's with mecanica variable and other variables in the condition?
I think your best bet is to set more flags or variables (boolean), I mean each path should have its own flags so that you can recreate the condition more specifically. Which most likely to result in other paths not being affected.
-
isobellesophia
- Miko-Class Veteran
- Posts: 979
- Joined: Mon Jan 07, 2019 2:55 am
- Completed: None
- Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
- Organization: Friendly Teachers series
- Deviantart: SophBelle
- itch: Child Creation
- Location: Philippines, Mindanao
-
Contact:
#3
Post
by isobellesophia » Thu Sep 26, 2019 9:08 pm
Are you relating to lock the previous one that the player plays?
I am a friendly user, please respect and have a good day.

-
zabuzaeldemonio
- Regular
- Posts: 100
- Joined: Sun Jan 08, 2017 7:24 pm
- Projects: Call Me
- Location: Spain
-
Contact:
#4
Post
by zabuzaeldemonio » Sat Sep 28, 2019 5:34 pm
In the image example you can see three circles, yellow is normal, red means that the player is already there and gray means that has already been there. So in my code I try to use analyze that, buts its kinda hard
Last edited by
zabuzaeldemonio on Sat Sep 28, 2019 5:40 pm, edited 1 time in total.
My personal
Project:

-
zabuzaeldemonio
- Regular
- Posts: 100
- Joined: Sun Jan 08, 2017 7:24 pm
- Projects: Call Me
- Location: Spain
-
Contact:
#5
Post
by zabuzaeldemonio » Sat Sep 28, 2019 5:34 pm
isobellesophia wrote: ↑Thu Sep 26, 2019 9:08 pm
Are you relating to lock the previous one that the player plays?
I use variables in each decision, so I can analyze where the guideline is. The problem is that I don't know how to leave the trail that indicates the path the player has taken.
My personal
Project:

-
isobellesophia
- Miko-Class Veteran
- Posts: 979
- Joined: Mon Jan 07, 2019 2:55 am
- Completed: None
- Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
- Organization: Friendly Teachers series
- Deviantart: SophBelle
- itch: Child Creation
- Location: Philippines, Mindanao
-
Contact:
#6
Post
by isobellesophia » Sun Sep 29, 2019 1:43 am
zabuzaeldemonio wrote: ↑Sat Sep 28, 2019 5:34 pm
isobellesophia wrote: ↑Thu Sep 26, 2019 9:08 pm
Are you relating to lock the previous one that the player plays?
I use variables in each decision, so I can analyze where the guideline is. The problem is that I don't know how to leave the trail that indicates the path the player has taken.
If variables can do.. you need an if and elif that changes the trail that player has taken, like a gray color for example that they completed that guide. I cannot give some examples today so..
I am a friendly user, please respect and have a good day.

-
gas
- Miko-Class Veteran
- Posts: 838
- Joined: Mon Jan 26, 2009 7:21 pm
-
Contact:
#7
Post
by gas » Sun Sep 29, 2019 6:13 pm
It doesn't seems so hard. Use a list and indexes.
the index is the scene id (first scene index 0, second scene index 1, ...), then assign a default value of 0 (not seen), and 1 (there) or 2 (end of the scene, so already seen once ) in the labels.
Then, in such screen, cycle with a for cycle in the whole list, and show accordingly.
The harder thing to grasp is that you don't actually need to put such event id in any "storywise" order.
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.
10 ? "RENPY"
20 GOTO 10
RUN
Users browsing this forum: Bing [Bot], _ticlock_