char State[2][8]={"Stop","Walk"};
char Names[4][16]={"Player1","Player2","Player3","Player4"};
char Direction[3][8]={"Left","NULL","Right"};
char AnimName[24]; //to return animation name later
int anim; //to break the animation
int direct; //the direction index, -1=Left, 1=Right
int type; //character index, 0=Player1, 1=Player2, etc...
int state; //state index, 0=Stop, 1=Walk
int attack; //attack index, 0=No attack, 1=Attack
int speed; //or change this value into any value you wanttype=0;
speed=6;
direct=1;
sprintf(AnimName,"%s%s%s",Names[type],State[state],Direction[direct+1]);
ChangeAnimation("Event Actor", AnimName, FORWARD);x+=state*direct*speed*(attack==0);
if(attack==0&&anim==0)
{
sprintf(AnimName,"%s%s%s",Names[type],State[state],Direction[direct+1]);
ChangeAnimation("Event Actor", AnimName, FORWARD);
anim=1;
}anim=0;
attack=0;if(attack==0)
{
state=1;
}
direct=-1;if(attack==0)
{
state=1;
}
direct=1;sprintf(AnimName,"%sPunch%s",Names[type],Direction[direct+1]);
ChangeAnimation("Event Actor", AnimName, FORWARD);
attack=1;sprintf(AnimName,"%sKick%s",Names[type],Direction[direct+1]);
ChangeAnimation("Event Actor", AnimName, FORWARD);
attack=1;
Hblade wrote:AWESOME BEE-ANT!
state=(attack==0);
direct=-1;state=(attack==0);
direct=1;
Camper1995 wrote:That's exactly what I wanted to say!
Good job Bee
krenisis wrote:Solid coding from the master himself bee-ant.


Chai wrote:Excellent code. This is code so wonderful.
Bee-Ant, you are really universe above the sky.

Bee-Ant wrote:Chai wrote:Excellent code. This is code so wonderful.
Bee-Ant, you are really universe above the sky.
Yet still I live on earth![]()
![]()
Users browsing this forum: No registered users and 1 guest