SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Bug Reports (https://forum.sa-mp.com/forumdisplay.php?f=20)
-   -   Move actors using animations (https://forum.sa-mp.com/showthread.php?t=652263)

sOflY 06/04/2018 08:16 PM

Move actors using animations
 
In SAMP 0.3.DL-R1, actors can move by using this animations:
Code:

ApplyActorAnimation(actorid, !"ped", !"WALK_drunk" ,4.1,1,1,1,0,0);
ApplyActorAnimation(actorid, !"ped", !"Crouch_Roll_L" , 4.1,1,1,1,0,0);

But they can move only by using
Code:

SetActorInvulnerable(actorid, 0);
Actors can move, but their coords don't change. I don't know how it does work, but it work) :p
Does it bug or feature? :D

Abagail 07/04/2018 08:11 PM

Re: Move actors using animations
 
Quote:

Originally Posted by sOflY (Post 4009993)
In SAMP 0.3.DL-R1, actors can move by using this animations:
Code:

ApplyActorAnimation(actorid, !"ped", !"WALK_drunk" ,4.1,1,1,1,0,0);
ApplyActorAnimation(actorid, !"ped", !"Crouch_Roll_L" , 4.1,1,1,1,0,0);

But they can move only by using
Code:

SetActorInvulnerable(actorid, 0);
Actors can move, but their coords don't change. I don't know how it does work, but it work) :p
Does it bug or feature? :D

Actors aren't meant to walk, so position changes not pushed (i.e: SetActorPos) won't be synced, your client is the only one who sees the actor moving. The server has no idea they're using an animation or that their position has changed, and actors may desync positions across clients (so different players may see them at a different place under certain conditions).

ATomas 18/04/2018 10:40 AM

Re: Move actors using animations
 
That's great. I hope again the actor will not be frozen.

Although x and y do not change, they can be estimated by helping animation time and the surrounding environment

sOflY 29/04/2018 10:24 PM

Re: Move actors using animations
 
Quote:

Originally Posted by Abagail (Post 4010207)
Actors aren't meant to walk, so position changes not pushed (i.e: SetActorPos) won't be synced, your client is the only one who sees the actor moving. The server has no idea they're using an animation or that their position has changed, and actors may desync positions across clients (so different players may see them at a different place under certain conditions).

I know. I didn't wanted to say, that positions of actors isn't change, I wanted to say, that actors CAN move using animations

MarkNelson 30/04/2018 01:09 AM

Re: Move actors using animations
 
what about using the walk animation and using a timer which teleports the actor by 1cm every 200 milliseconds ?


All times are GMT. The time now is 05:40 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.