Global Code:
- Code: Select all
short int checksum;
Key Down even of your actor (Repeat Disable):
- Code: Select all
checksum += 1;
if (checksum >= 3) checksum = 1;
if (checksum == 1) x += 5;
if (checksum == 2) x -= 5;
Of course, you can change
x += 5 and
x -=5 with anything you wish. Like changing animation or so.
Thats how you can use one single button, used for a several functions. Well at least thats how i would do.
_______________________________________________________________________________________________
If you want to use simple timer, made with code you can use that down. It works only if you don't change the
game's default FPS rate. By default its 30. That fps determine the speed of transmitting frames of an movement.
Global Code:
- Code: Select all
void after(const int seconds)
{
int ms; ms++;
if (ms / 25 == seconds) hit = 0; //Or what happens when the time is up
}
Any Actor -> Draw Actor:
- Code: Select all
after(10); //10 stands for the seconds you wish
_______________________________________________________________________________________________
Street of rage is a good game of SEGA. You can also use dual key hit:
Axel -> Key Down -> qe (all keys are pressed)
- Code: Select all
//code
You can also do the same for combos:
Axel -> Key Dow -> qwe (all keys are pressed in order)
- Code: Select all
//code