Left = 1;
Right = 0;
Right = 1;
Left = 0;
if(Left == 1)
{
ChangeAnimation(ThePunchLeft, Forward);
}
If(Right==1)
{
ChangeAnimation(ThePunchRight, Forward);
}
char*key=GetKeyState();
if(key[KEY_LEFT] == 1)direct = 1;
if(key[KEY_RIGHT] == 1)direct = 0;
if(direct == 0)ChangeAnimation("PunchRight", Forward);
if(direct == 1)ChangeAnimation("PunchLeft", Forward);
Kooldudese wrote:by the way, attacking right and attacking left are both the same button, i was thinking(cuz im bad with codes) mabye i could make 2 invisible regions, one is right and other is left,(infinite y, and the x is as big as it needs to cover the playing field), if the opponent is on the right side and i press punch then i use the right side animation, and vice versa, do you think this would work?,(by the way i will parent the regions to the player)
Kooldudese wrote:umm if there is two animations for left punch and right punch is it the same?, 50%50% chance for every punch to happen.
Users browsing this forum: No registered users and 1 guest