Re: Wanting to learn BGT

An easier way to do it may be to just use a single integer to represent the player's x-coordinate.

int x = 0; // current position
int levelSize = 10;
if (key_pressed(KEY_RIGHT) && x+1 < levelSize)
x++;
else if (KEY_PRESSED(KEY_LEFT) && x-1 >= 0)
x--;

_______________________________________________
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Victorious via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : lukas via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : ross via Audiogames-reflector

Reply via email to