thanks, i want to put it in Draw Actor but there are glitches idk
- Code: Select all
char* key = GetKeyState();
if(shot>=1 && shotwait==1 && key[KEY_PAD_4]==1 )
{
CreateActor("bullet_left", "bullet_blue.png", "(none)", "(none)", 0, 0, false);
shotwait=0;
CreateTimer("Event Actor", "shot wait", 500);
}
else if(shot>=1 && shotwait==1 && key[KEY_7]==1 )
{
CreateActor("bullet_upleft", "bullet_blue.png", "(none)", "(none)", 0, 0, false);
shotwait=0;
CreateTimer("Event Actor", "shot wait", 500);
}
else if(shot>=1 && shotwait==1 && key[KEY_8]==1 )
{
CreateActor("bullet_up", "bullet_blue.png", "(none)", "(none)", 0, 0, false);
shotwait=0;
CreateTimer("Event Actor", "shot wait", 500);
}
else if(shot>=1 && shotwait==1 && key[KEY_9]==1 )
{
CreateActor("bullet_upright", "bullet_blue.png", "(none)", "(none)", 0, 0, false);
shotwait=0;
CreateTimer("Event Actor", "shot wait", 500);
}
else if(shot>=1 && shotwait==1 && key[KEY_6]==1 )
{
CreateActor("bullet", "bullet_blue.png", "(none)", "(none)", 0, 0, false);
shotwait=0;
CreateTimer("Event Actor", "shot wait", 500);
}
else if(shot>=1 && shotwait==1 && key[KEY_PAD_3]==1 )
{
CreateActor("bullet_downright", "bullet_blue.png", "(none)", "(none)", 0, 0, false);
shotwait=0;
CreateTimer("Event Actor", "shot wait", 500);
}
else if(shot>=1 && shotwait==1 && key[KEY_2]==1 )
{
CreateActor("bullet_down", "bullet_blue.png", "(none)", "(none)", 0, 0, false);
shotwait=0;
CreateTimer("Event Actor", "shot wait", 500);
}
else if(shot>=1 && shotwait==1 && key[KEY_1]==1 )
{
CreateActor("bullet_downleft", "bullet_blue.png", "(none)", "(none)", 0, 0, false);
shotwait=0;
CreateTimer("Event Actor", "shot wait", 500);
}
CreateActor("bullet_downleft", "bullet_blue.png", "(none)", "(none)", 0, 0, false);
meansthe bullet creates and I made when it creates it goes xvelocity=10;