Page 1 of 1

Game stops when no actions

Posted: Mon May 25, 2020 3:11 pm
by iDweadith
How do I make the game to keep going instead of exiting, when there are not any actions, and also if I click on screen?

I want the screen in idle mode like it's waiting for some action from the player

Re: Game stops when no actions

Posted: Mon May 25, 2020 5:41 pm
by Alex
It would be better if you'll provide the code you have so far.
What do you mean by 'exiting' - returning to main menu or exiting the screen, or..?

When you run your project, the code is executed line by line until it reaches the point where it should return back to main menu. Some statements (comands) make gameflow stop for some time or wait for user interaction. Others don't stop the gameflow. So, this sample doesn't show you anything, well actually it shows, but you won't notice it...

Code: Select all

label start:
    scene bg my_scene
    show char at left
    show char_2 at right
    scene bg the_end
But if you add some dialogues...

Code: Select all

label start:
    scene bg my_scene
    "bg"
    show char at left
    show char_2 at right
    "chars"
    scene bg the_end
    "the end"

Re: Game stops when no actions

Posted: Mon May 25, 2020 6:20 pm
by rayminator
he wants to make game endless like summertime saga

one way to that is make sure goes to a map or a location and that you don''t put a return in it will return to the main menu or close the game this is one way you still have to tell renpy replay scenes again I don't know how to do that yet

Re: Game stops when no actions

Posted: Tue May 26, 2020 3:35 am
by iDweadith
Yes I need a screen in idle mode, that waits the player to do something, because if I click on screen the code flows, and if there is no lines it stops

I don't know I'm still working on it,

Re: Game stops when no actions

Posted: Tue May 26, 2020 12:10 pm
by Alex
If you add this to the screen, player won't be able to progress in game while this screen is shown.

Code: Select all

key 'dismiss' action NullAction()
https://www.renpy.org/doc/html/screens.html#key

Re: Game stops when no actions

Posted: Tue May 26, 2020 1:19 pm
by gas
Ah, it's easy.
It's a matter of creating a loop...

Code: Select all

label start:
    "Welcome to an endless simulation!"
    jump loop

label loop:
    call screen whatever
    call expression _return # this call the label returned by the screen...
    jump loop

label mall_label:
    "You are in the mall!"
    return

label beach_label:
    "You are in the beach!"
    return

screen whatever():
    vbox:
        textbutton "Mall" action Return ("mall_label")
        textbutton "Beach" action Return ("beach_label")

Re: Game stops when no actions

Posted: Wed May 27, 2020 3:38 am
by iDweadith
Yes! thank you guys :D