Bug with actors
#1

How to fix this bug (actor is moving, but don't go):

[ame="http://www.youtube.com/watch?v=LfOOmd-rJ6g"]video[/ame]

PHP код:
new animAndSpeed[2][animData] = {
        {
"WALK_civi",1.5357},
        {
"RUN_civi",3.7}
};
public 
CreateActor(playeridanimation)
{
  new 
actorid;
  new 
Float:xFloat:yFloat:z;
  
GetPlayerPos(playeridxyz);
  
actorid CreateActor(189x+1y+1z0);
  
ApplyActorAnimation(actorid"ped"animAndSpeed[0][animation], 4.111100);

Reply
#2

You made a moon-walking actor, congratulations !

https://sampwiki.blast.hk/wiki/ApplyAnimation
Try setting lockx, locky, freeze to 0, or just freeze to 0, or just lockx and locky to 0. Play around with the parameters. (if not, it may be from the animation and you should try another one)
Reply
#3

Quote:
Originally Posted by IstuntmanI
Посмотреть сообщение
You made a moon-walking actor, congratulations !

https://sampwiki.blast.hk/wiki/ApplyAnimation
Try setting lockx, locky, freeze to 0, or just freeze to 0, or just lockx and locky to 0. Play around with the parameters. (if not, it may be from the animation and you should try another one)
I've changed some parameters. Now it looks like that:
[ame="http://www.youtube.com/watch?v=2qlqVj6y_F0"]http://www.youtube.com/watch?v=2qlqVj6y_F0[/ame]

So:
PHP код:
new animAndSpeed[2][animData] = {
        {
"WALK_civi",1.5357},
        {
"RUN_civi",3.7}
};
public 
CreateActor(playeridanimation)
{
  new 
actorid;
  new 
Float:xFloat:yFloat:z;
  
GetPlayerPos(playeridxyz);
  
actorid CreateActor(189x+1y+1z0);
  
ApplyActorAnimation(actorid"ped"animAndSpeed[0][animation], 4.110010);

And so:
PHP код:
new animAndSpeed[2][animData] = {
        {
"WALK_civi",1.5357},
        {
"RUN_civi",3.7}
};
public 
CreateActor(playeridanimation)
{
  new 
actorid;
  new 
Float:xFloat:yFloat:z;
  
GetPlayerPos(playeridxyz);
  
actorid CreateActor(189x+1y+1z0);
  
ApplyActorAnimation(actorid"ped"animAndSpeed[0][animation], 4.110000);

Reply
#4

Don't expect the actor will start walking on his own, you have to manually set the new position after he has finished his animation.
Reply
#5

Is there any callback to catch a moment of an animation finishing?
Reply
#6

Well, also try to play with the loop parameter. xD Just play with all parameters, you will have success after all. Just try different combinations of 0s and 1s.

There's no callback to detect when an animation ends.
Reply
#7

Actor is not supposed to walk because of sync. The thing u want to achive was able to be done in one of RC releases, but now - all you can do is just regular NPC.
Reply
#8

Actors are not designed to walk, use NPC's!
Reply
#9

Quote:
Originally Posted by hydewhyd
Посмотреть сообщение
Actors are not designed to walk, use NPC's!
Yes, actors are not desinged to walk, you have to use NPCs instead.
But if the thing with actors work, they may fall in water or reach a wall..

EDIT: And this is not a bug.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)