
▲ 2 r/RenPy
How do I shift the location icons over to the open spaces?
Hey guys! So, I have another question to ask!
So in my visual novel, I have a functioning Day/Night cycle and days of the week with the NPCS changing locations throughout the day/week, and I have these placeholder squares to show the player where the NPCS are currently residing (I'll be updating the squares with chibi icons of the characters in due time!). I'm using a grid to set this up. It works, but is there a way to shift the displayed squares over to the open spaces automatically? I'd like the squares to be closer together and not spaced out like that. I'll also provide the code to show you my work.
This is the college campus on Monday afternoon (For context for the code, Monday is dayofweeknumber 1.)
Thanks in advance!
######Afternoon#####
##Campus
frame:
background None
grid 3 2:
transpose True
xpos 1100
ypos 250
if dayofweeknumber in range (1,4) and energy in range(7,10):
add "gui/button/check_selected_foreground.png" xalign 0.2 yalign 0.3 #Marine, With Graham
else:
null
if dayofweeknumber == 2 and energy in range(7,10):
add "gui/button/check_selected_foreground.png" xalign 0.2 yalign 0.3 #Serena
else:
null
if dayofweeknumber in range (1,3) and energy in range(7,10):
add "gui/button/check_selected_foreground.png" xalign 0.2 yalign 0.3 #Cameron
else:
null
if dayofweeknumber in range(4,6) and energy in range(7,10):
add "gui/button/check_selected_foreground.png" xalign 0.2 yalign 0.3 #Grinn
else:
null
if energy in range(7,10) and dayofweeknumber in range (3,5):
add "gui/button/check_selected_foreground.png" xalign 0.2 yalign 0.3 #Reyin
else:
null
if energy in range(7,10) and dayofweeknumber == 4:
add "gui/button/check_selected_foreground.png" xalign 0.2 yalign 0.3 #Syd
else:
null
u/Discord_Melody — 18 hours ago