Time-based Tile Change

CGGames

New member
Hello all, I'm currently working on a game idea that requires certain tiles to change state / sprite when you touch them, wait a fraction of a second, then change again. The basic tutorials have taught me how to do the first part, but I'm unsure how to do the second, time based state / sprite change. Any advice? Thanks!
 

CGGames

New member
Doh! I just realized how easy this issue is to address.

Sorry guys, I'd make the "It's my first day" joke, but I guess this actually IS my first day on the forum... Starting off strong 🤦‍♂️
 

mouse spirit

Well-known member
I would say have your tile count down a variable when touching, that then
changes its tile type or graphic when the variable reaches certain points.

Or create a counter that triggers change all tiles possibly..
 

mouse spirit

Well-known member
This may help https://www.nesmakers.com/index.php?threads/solved-4-5-9-countdown-timer-in-maze-module.6510/

But what i did was, a workaround.

Tiles are active when colliding with something here. So i made a variable.
When im colliding with tile "1" , i have the code DEC or INC a variable.
Then in code, have stuff happen when variable is at a certain position.
Also have it reset, say when it reaches #$00.

This may not be efficient. And if there is a vid tutorial on actual timers, i'm not sure.
But searching using the search tool on the forum may yield some
good results. Use a word like timer and only search titles.

There are already some timers set up, and i think people use those.
Although i don't have alot of knowledge on that subject, sorry.
 
Last edited:
Top Bottom