
When the player choose where to go (Thus the other buttons) a random event will be picked displaying the normal dialogue box with an image.
So how do I go about making the "Recent events" box?
Also, the "Recent Events" will be random as well.

Code: Select all
init:
$ x = 1066 #Screen size x
$ y = 600 #Screen size y
$ display_events = ""
$ place = ""
screen recent_events:
vbox:
xalign 0.1
yalign 1.0
xminimum int(x*0.5)
yminimum int(y*0.5)
frame:
text display_events
screen worldmap:
modal True #Don't interact underneath it.
frame:
xfill True
yfill True
vbox:
xalign 0.5
yalign 0.5
textbutton "Village" action [SetVariable('place', "Village"), Jump('random_events')]
textbutton "Castle" action [SetVariable('place', ""), Jump('random_events')]
use recent_events
label start:
show screen worldmap
label worldmap:
call screen worldmap
jump worldmap
label random_events:
$ RandomNum = renpy.random.randint(1,3)
if RandomNum == 1:
$ display_events = "This is my display event."
elif RandomNum == 2:
$ display_events = "This is my display event."
elif RandomNum == 3:
$ display_events = "This is my display event."
else:
$ display_events = ""
if place == "Village":
jump village
else:
"No place selected."
jump worldmap
label village:
"Do stuff in village. Go back to world map."
jump worldmapUsers browsing this forum: No registered users