SA-MP Forums Archive
Animation sync - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Bug Reports (https://sampforum.blast.hk/forumdisplay.php?fid=20)
+--- Thread: Animation sync (/showthread.php?tid=330710)



Animation sync - MP2 - 02.04.2012

Player 1 has an animation applied. Player 2 goes away (streams out) and comes back (streams in) - animation gone. Or, if player 2 was already streamed out, of course. Fix please. Extremely annoying in a range of circumstances, I can only imagine how annoying this is for hardcore RPers.


Re: Animation sync - leong124 - 02.04.2012

I think it is designed like that. Everything will not be loaded and synced if they are not streamed in. Even if they are streamed in again after the animation was started, you can't sync the animation from the mid-way of it.


Re: Animation sync - MP2 - 02.04.2012

It must be possible.


Re: Animation sync - Kwarde - 02.04.2012

Why do you think it's possible? I am not very sure (perhaps it is, but...), because of this reason: In every game I play I see this sometimes: Peds not doing anything, and with their arms horizontal (because that's how they are designed). Once I stream in, they are 'normal'.
Another example: In Assassin's Creed Revelations (It happened today) (all the parts actually) it's the same: When I enter an area, then the people start to sit on the bench. With every game I play these small things happens.


Re: Animation sync - MP2 - 02.04.2012

Well even so, at least sync them from the start of the animation - it's better than them just standing there.


Re: Animation sync - Kwarde - 02.04.2012

That's true, but this is also possible to make by scripting. You can use "OnPlayerStreamIn" and "OnPlayerStreamOut". For this, you must make some kind of 'custom' ApplyAnimation that saves all the parameters. So when you stream in to a player you can start that animation if an animation was applied to that player.

p.s.
'forcesync' doesn't work with this?


Re: Animation sync - MP2 - 02.04.2012

Yeah but then it will start again for everyone, which would be terrible.

I'm not sure what forcesync does, I will play around with it.


Re: Animation sync - Kwarde - 02.04.2012

Well this is a quote from the wiki:

Quote:

The 'forcesync' optional parameter, which defaults to 0, in most cases is not needed since players sync animations themselves. The 'forcesync' parameter can force all players who can see 'playerid' to play the animation regardless of whether the player is performing that animation. This is useful in circumstances where the player can't sync the animation themselves. For example, they might be alt-tabbed.




Re: Animation sync - MP2 - 02.04.2012

I don't know if that applies to streaming, though. If I apply an animation with forcesync set to 0, other players never see the animation.


AW: Animation sync - FufLa - 02.04.2012

You can easily fix this with OnPlayerStreamIn like Kwarde said.

I've done it this way. Even though I only restore looping animations like sitting or hands up and so on because there is no need for restoring a drunk animation that lasts only ~3 seconds and is gone afterwards.

Dont think it should be considered a bug though.