I know that someone has already posted this question:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=32121.msg414514 (http://www.adventuregamestudio.co.uk/forums/index.php?topic=32121.msg414514)
But I couldn't implement khris' code, the process keeps repeating itself when I keep the key pressed
bool down;
//rep_ex
if (IsKeyPressed(32)) {
if (!down) {
down=true;
// do stuff
}
}
else down=false;
Thank you for helping me :wink:
Did you put the line "bool down;" above the repeatedly_execute function?
bool down;
function repeatedly_execute() {
if (IsKeyPressed(32)) {
if (!down) {
down=true;
// do stuff
}
}
else down=false;
}
Quote from: Khris on Mon 01/04/2013 19:30:03
Did you put the line "bool down;" above the repeatedly_execute function?
bool down;
function repeatedly_execute() {
if (IsKeyPressed(32)) {
if (!down) {
down=true;
// do stuff
}
}
else down=false;
}
Ups! :shocked:
Thank you again Khris!