Hi MIT App Inventor community,
I'm developing a slot machine-style mini-game in App Inventor that includes a cooldown system after a limited number of attempts. I'm using TinyDB
to store:
- The number of remaining attempts (
remainingSlotAttempts
) - The cooldown time in seconds (
remainingCooldownSeconds
)
The Goal
Once the player uses up all 5 attempts, a 300-second (5-minute) cooldown should start. During this time, a countdown is displayed using a Clock
component (RelojEspera
). After the countdown finishes, the 5 attempts are restored automatically.
The Issue
Even though:
- The
global Cooldown
value is saved and updated correctly, RelojEspera.TimerEnabled
is set totrue
,- The block
when RelojEspera.Timer
exists in the project,
β¦ the timer event never fires, and the countdown does not update on screen.
What I've tried so far
- Confirmed that
RelojEspera
is on the current screen. - Made sure its
TimerInterval
is set to1000
ms. - Placed alerts inside the
Timer
event block to confirm if it runs (it doesn't). - Tried re-enabling the timer in multiple ways after setting the cooldown value.
- Checked for any other block that could be disabling the timer β found none.
Key Blocks
I've attached screenshots of the relevant blocks in this thread.
Question
What could prevent a timer from firing even if itβs enabled and its interval is set properly? Could this be related to execution order or how App Inventor handles enabling timers?
Snark_tumascotapasivoagresiva_1_1 (1).aia (980.1 KB)