Game stops when no actions

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.
Post Reply
Message
Author
User avatar
iDweadith
Regular
Posts: 63
Joined: Sun Mar 01, 2020 4:15 pm
Contact:

Game stops when no actions

#1 Post by iDweadith » Mon May 25, 2020 3:11 pm

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

User avatar
Alex
Lemma-Class Veteran
Posts: 2501
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Game stops when no actions

#2 Post by Alex » Mon May 25, 2020 5:41 pm

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"

User avatar
rayminator
Veteran
Posts: 445
Joined: Fri Feb 09, 2018 12:05 am
Projects: Redoing games to fix spelling mistakes other companys that don't care
Location: Canada
Contact:

Re: Game stops when no actions

#3 Post by rayminator » Mon May 25, 2020 6:20 pm

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
when I try to help someone I point them into 2 direction what's right and wrong so they can learn how to

User avatar
iDweadith
Regular
Posts: 63
Joined: Sun Mar 01, 2020 4:15 pm
Contact:

Re: Game stops when no actions

#4 Post by iDweadith » Tue May 26, 2020 3:35 am

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,

User avatar
Alex
Lemma-Class Veteran
Posts: 2501
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Game stops when no actions

#5 Post by Alex » Tue May 26, 2020 12:10 pm

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

User avatar
gas
Miko-Class Veteran
Posts: 718
Joined: Mon Jan 26, 2009 7:21 pm
Contact:

Re: Game stops when no actions

#6 Post by gas » Tue May 26, 2020 1:19 pm

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")
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll be not notified about.

10 ? "RENPY"
20 GOTO 10

RUN

User avatar
iDweadith
Regular
Posts: 63
Joined: Sun Mar 01, 2020 4:15 pm
Contact:

Re: Game stops when no actions

#7 Post by iDweadith » Wed May 27, 2020 3:38 am

Yes! thank you guys :D

Post Reply

Who is online

Users browsing this forum: Google [Bot]