Re: please help me with my bgt code.

Try moving your home/end checks out of the for loop, on the same level as:

if(key_pressed(KEY_ESCAPE))

There is indeed a more efficient way that doesn't insist on repeating the same line a bunch of times for each keypress.

Each of the KEY_* constants are integers. If memory serves:

int KEY_1 = 2
int KEY_2 = 3;
// ...
int KEY_5 = 6;


int KEY_Q = 16;
int KEY_W = 17;
// ...
int KEY_T = 20;

Meaning you could theoretically get a list of currently pressed keys with keys_pressed and check if between 2 and 6 (for the number row) or 16 and 20 (for letters).
If the former, use b[key-2]. If the former, l[key-16].

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

Reply via email to