Ren'Py {the land of arabasta} quastion about maps and location

Yass4Fake

Arabasta is a nightmare
Game Developer
Jun 27, 2019
43
27
hey right now i finished and intro to my game then i made an imagebutton that opens up a map and i put locations and all but now i want to know how to add a system where whenever i click a location for example first time it gives me a scene second time another scene and event without making day and night cycle cuz my pc sucks and i suck at making art so i dont wanna make a lot of renders for night noon and morning at least not for this version
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,130
14,809
[...] but now i want to know how to add a system where whenever i click a location for example first time it gives me a scene second time another scene [...]
The most basic way is something looking like that:

Python:
default quest1 = 0
default quest2 = 0

screen whatever():
    vbox:

        textbutton "go there" action Jump( "there" )
        textbutton "go here" action Jump( "here" )
        textbutton "Cancel" action Return()
   
label whatever():
    call screen whatever
    "Ok, well you take a short nap instead."
    jump whatever

# Method 1, pure and annoying to code /if/ structure
label there:
    $ quest1 += 1
    if quest1 == 1:
        jump thereFirst
   elif quest1 == 2:
        jump thereSecond
   [...]
   else:
       "You reach the actual end of this story line."
       jump whatever

label thereFirst:
    [...]
label thereSecond:
    [...]

# Method 2, benefit from Ren'Py dynamism
label here:
    $ quest2 += 1
    if renpy.has_label( "here{}".format( quest2 ) ):
        jump expression "here{}".format( quest2 )
   else:
       "You reach the actual end of this story line."
       jump whatever

label here1:
    [...]

label here2:
    [...]