Bug with actors -
Bombo - 15.12.2015
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(playerid, animation)
{
new actorid;
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
actorid = CreateActor(189, x+1, y+1, z, 0);
ApplyActorAnimation(actorid, "ped", animAndSpeed[0][animation], 4.1, 1, 1, 1, 0, 0);
}
Re: Bug with actors -
IstuntmanI - 15.12.2015
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)
Re: Bug with actors -
Bombo - 15.12.2015
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(playerid, animation)
{
new actorid;
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
actorid = CreateActor(189, x+1, y+1, z, 0);
ApplyActorAnimation(actorid, "ped", animAndSpeed[0][animation], 4.1, 1, 0, 0, 1, 0);
}
And so:
PHP код:
new animAndSpeed[2][animData] = {
{"WALK_civi",1.5357},
{"RUN_civi",3.7}
};
public CreateActor(playerid, animation)
{
new actorid;
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
actorid = CreateActor(189, x+1, y+1, z, 0);
ApplyActorAnimation(actorid, "ped", animAndSpeed[0][animation], 4.1, 1, 0, 0, 0, 0);
}
Re: Bug with actors -
IllidanS4 - 15.12.2015
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.
Re: Bug with actors -
Bombo - 15.12.2015
Is there any callback to catch a moment of an animation finishing?
Re: Bug with actors -
IstuntmanI - 15.12.2015
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.
Re: Bug with actors -
cdoubleoper - 16.12.2015
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.
Respuesta: Bug with actors -
Whyd - 29.12.2015
Actors are not designed to walk, use NPC's!
Re: Respuesta: Bug with actors -
Darkwood17 - 29.12.2015
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.