if(shootdir==1)ChangeAnimation("Event Actor", "PlayerStillLeft", NO_CHANGE);
if(shootdir==2)ChangeAnimation("Event Actor", "PlayerStillRight", NO_CHANGE);
if(shootdir==1) //shooting to the left
{
if (playerdir==5) //when jumping facing left
{
ChangeAnimation("Event Actor", "PlayerJumpLeft", FORWARD);
}
else
{
ChangeAnimation("Event Actor", "PlayerStillLeft", NO_CHANGE);
}
}
if(shootdir==2) //shooting to the right
{
if (playerdir==4) //when jumping facing right
{
ChangeAnimation("Event Actor", "PlayerJumpRight", FORWARD);
}
else
{
ChangeAnimation("Event Actor", "PlayerStillRight", NO_CHANGE);
}
}
#define STAND_RIGHT 0
#define STAND_LEFT 1
switch(state)
{
case STAND_RIGHT:
//Do something here
break;
case STAND_LEFT:
//Do something here, too
break;
}
switch(state)
{
case 0:
//Do something here
break;
case 1:
//Do something here, too
break;
}
state = STAND_RIGHT;
#define KILL DestroyActor("Event Actor") //No semicolon here!
KILL;
Turon wrote:So I don't need two variables?
Turon wrote:Why is that variable called "state" instead of a more meaningful name?
Google Definition wrote:State
1. the particular condition that someone or something is in at a specific time
foleyjo wrote:When applying numbers to a word is it best to use #defines or enums?
Users browsing this forum: No registered users and 1 guest