Problem with Looping Anim
#1

So im working on a aclocolsystem, so i need the "drunk" animation. But the Player should be able to move while playing the anim.
The System works like:
You drink some alcohol, then after a short period of time youll get drunk. There are different types of beeing drunk, first you just walk drunk, then the weather changes to something very strange until you just fall on the ground (didnt found the right anim for that) and your health decreases - the worst case is death. These effects disappear after a while and you behave normal.

Everythign works fine except the anims. I did:
Code:
ApplyAnimation(i,"PED","WALK_DRUNK",4.1,1,1,1,1,1);
Because you could stop this admin with pressing jumpkey or firekey i use this code every second the player is drunk. But as i said above i want to have an other anim if you are very drunk (fall on ground anim), which isnt really working:
Code:
ApplyAnimation(i, "WUZI", "CS_Dead_Guy", 4.0, 1, 1, 1, 1, 0); // Wrong anim but i dont find the other one
If i use it only once the drunk animation just continues, if i use it every second it works. But then at a certain point every anim should stop, so i used
Code:
ClearAnimations(...);
But nothing happens, it just continues to walk drunk. It doesnt matter if i use the drunk anim once or every second.
Wheres the failure?
Reply
#2

Ok i tried a little bit whats the problem with
Code:
ClearAnimations(...);
if i use
Code:
ApplyAnimation(i,"PED","WALK_DRUNK",4.1,1,1,1,1,0); // 0 at the end for "time"
it does work as it should, but if i use a "1" at the end like in my first post it doesnt. But if i use a "0" at the end my char cant move while walinking.
So what could i do to stop the "1" anim
Reply
#3

Quote:
Originally Posted by Doktor
Ok i tried a little bit whats the problem with
Code:
ClearAnimations(...);
if i use
Code:
ApplyAnimation(i,"PED","WALK_DRUNK",4.1,1,1,1,1,0); // 0 at the end for "time"
it does work as it should, but if i use a "1" at the end like in my first post it doesnt. But if i use a "0" at the end my char cant move while walinking.
So what could i do to stop the "1" anim
Its worked for my:
Code:
LoopingAnim(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,1);
And you need to put 1 at the end.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)