A timer will countdown on the background and after it goes to 0, you will have a point that you can spend in the game.
It's kinda like (most) Visual novel games on Android nowadays.
But I don't want the "Energy" system where you need to spend "Energy" to open a chapters yada yada yada..
I'm thinking of a code that will increase the "points" for a character in real time. Even when the app is closed or just running on the background.
I did some coding, combing different forum posts and codes I found in LSF and on the WWW.
And here's what I got:
Code: Select all
# The script of the game goes in this file.
# Declare characters used by this game. The color argument colorizes the
# name of the character.
define e = Character("Eileen")
default now = 0
default timer = 0
default give_point_timer = 10 # Seconds
default point = 0
#default today = datetime.datetime.now().strftime("%S")
init python:
import time
screen cash():
timer 1.0 action Jump("waiting_loop")
vbox:
text "Eileen's Points: [point]"
text "+1 in [wait:.0f] seconds"
label waiting_loop:
hide screen cash
show screen cash
$ now = time.time()
$ wait = timer + give_point_timer - now
#"Wait for [wait:.0f] seconds"
if wait < 1:
$point = point + 1
$wait =wait + 9
$ timer = time.time()
#jump waiting_loop
label start:
show screen cash
scene bg house
"JUST RANDOM"
$ timer = time.time()
screen black
"Yoh"
jump waiting_loop
return
But Thank you all so much in advanced you guys.