Animation help.. please
#1

So im making walking styles and its all fine apart from one thing, I have made it so if your holding the walk button you do the walking animation but how would i do it only if someone presses the walk button with up down left or right.. Also one more thing how could i make it so when someone stops holding the walk button they stop the walking animation

Please help

pawn Код:
if (HOLDING(KEY_WALK))
    {
        if(Player[playerid][UsingGangWalkOne] == 1)
        {
            ApplyAnimation(playerid, "PED", "WALK_gang1", 4.0, 1, 1, 1, 1, 1);
        }
    }
If you need any more code just ask

Please help

Thanks
Reply
#2

Try this:

pawn Код:
if(HOLDING(newkeys & KEY_WALK)
{
    if(Player[playerid][UsingGangWalkOne] == 1)
    {
        ApplyAnimation(playerid, "PED", "WALK_gang1", 4.0, 1, 1, 1, 1, 1);
    }
}
Reply
#3

Use this to ensure the animation stops when you release the key. Add your own variables and booleans, of course.
Код:
else if (RELEASED(KEY_WALK))
{
ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0, 1);
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)