If the player has been inactive for a long time.

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Post Reply
Message
Author
User avatar
Andredron
Miko-Class Veteran
Posts: 700
Joined: Thu Dec 28, 2017 2:37 pm
Location: Russia
Contact:

If the player has been inactive for a long time.

#1 Post by Andredron »

Code: Select all

init python:
    time_end = 5
    
screen timers():
    if time_end != 0:
        timer 60 repeat True action SetVariable('time_end', time_end - 1)
    else:
        timer 0.01 action Show('afk')
        
        
screen afk():
    add "black"
    text 'You haven't pressed anything for too long!' xalign 0.5 align 0.5

label start:
    show timers
    "???" "blah blah blah"
but basically, the idea is that by developing games for android, and creating a farm or something like that (where each farm of a certain level gives so many resources per second) and in the timer we prescribe to stop the farm from all farms.

I've seen something like this in at least a few similar games. what is disabled by in-game purchase.

Post Reply

Who is online

Users browsing this forum: No registered users