Re: making a runner

Here's how I would do it

if player.walk_timer.elapsed >= player.walk_time: # Or however your timer checks for elapsed
    player.walk_timer.restart()
    # Walking logic (just increasing and possibly speeding up).
    itemcheck() # We want to check for items every step.


def itemcheck():
    # Simply loop through all your items and do something like
    if i.type == "pit" and player.x == i.x and player.y == i.y:
        # Die

HTH.

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : MichaelJ via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Turret via Audiogames-reflector

Reply via email to