if(MOVE == 1) {
if(direction(x, y, player.x, player.y) < 360 && direction(x, y, player.x, player.y > 180)animpos = direction(x, y, player.x, player.y);\
}
count = ActorCount("turret");
sprintf(NAME1, "turret.%d", i);
getclone(NAME)->MOVE = 1;
while(i <= count) {
sprintf(NAME2, "turret.%d", i);
if(strcmp(NAME2, NAME) == 1)getclone(NAME2)->MOVE = 0;
i++;
}
if(i > count) i = 0;
select = 1;//setting the select variable to 1
select = 2;//setting the select variable to 2
char*key=GetKeyState();
if(key[KEY_q] == 0 && key[KEY_z] == 0)select = 0;
//it asks if either q or z is not pressed it will set the select variable to 0,
//in which case you will not use a turret.
if(select == 1)
{
your actions here;
}
if(select == 2)
{
your actions here;
}
Users browsing this forum: No registered users and 1 guest