The Problem
I've got two players in a platform game environment. The Peer can see the Host moving around, but can't see them animate, so they're stuck in the Idle position as they move.
My method
Am I going the right way about this?
Each character has a currentAnimation
instance variable attached to it, and the host is updating the variable whenever the animation changes, like so:
+ HeroBase: playerID = Multiplayer.HostID
+ Hero: characterName = HeroBase.associatedHero
+ Hero: Animation frame = 0
-> Hero: Set currentAnimation to Hero.AnimationName
-> testText: Set text to Hero.AnimationName
I'm using that testText
in order to check that the instance variable is updating on the Host's screen, which it is.
I've synced currentAnimation
like this:
-> Multiplayer: Sync Hero variable currentAnimation (precision Normal (float, 4 bytes), interpolation: None, client value tag: "")
And on the Peer's side, I've tried to translate that instance variable in to an animation for the Host's character:
+ System: Every tick
----+ HeroBase: playerID = Multiplayer.HostID
--------+ Hero: characterName = HeroBase.associatedHero
---------> Hero: Set animation to Hero.AnimationName (play from beginning)
---------> testText: Set text to Hero.AnimationName
But the testText
on the Peer's side just keeps showing "Idle" and the Host is just floating around.
The question
Is this the right method to keep animations synced? And where have I gone wrong please?