Synchronization problems (again)

Posted by Forgeio
Hey, In my game I've been working on for quite some time now I have a problem. When my character attacks, it doesn't sync the object it creates. For instance: when player 1 attacks, player 1 sees a hitbox facing the direction his character is facing, for player 2 however, they see the hitbox only facing right (never to the left). But when I synchronize the xscale, it affects both player 1 and player 2s xscales so that they have each others xscales, instead of them controlling their own individual hitboxes. Another problem I had with synchronization is that when a player attacks, the hitbox would hit him and destroy, but on the other persons screen it shows it not destroying and taking extra damage, leaving both clients with changed views of the game (player 1 may see player 2 dead when he does not see himself dead). Thanks for you time, hopefully you can help me with this. If you need the file, I can send a dropbox link.

Replies (2)

Last message on 24 Jun 2016

Size43 (Administrator) on 22 Jun 2016, 14:10:07
How are you syncing the xscale?

If you're using separate objects for the hitbox, you can sync the xscale variable of the instance itself. Note that if you're using GM:Studio, you'll have to work around the fact that I can't use variable_local_set to automatically set the variable. See this tutorial for more info.
Forgeio (Topicstarter) on 24 Jun 2016, 05:29:01
Alright I'll check out the tutorial, if I need more help I'll ask :)