Draw event is not syncing

Posted by AUGEgames
Hello, So I have a basic VS system based game like in the example of "getting started" but for some reason other player see unintended usual look, it's like player's draw event is not happening on other player pc. Am I missing something? Or is it a bug? No errors or crashes.

Replies (4)

Last message on 29 Aug 2020

Size43 (Administrator) on 8 Aug 2020, 17:20:59
What do you mean by "unintended usual look"?

By default the sprites of players are synced. If you wish to disable this, you can use gms_optimize_variables.
AUGEgames (Topicstarter) on 12 Aug 2020, 00:18:02
Generally it completely ignores DRAW event to be synced. Maybe I am missing something.

For the reference VS game example code contained draw event and it also was not functioning properly. Nor the health bar nor the kill count.
Size43 (Administrator) on 29 Aug 2020, 11:29:59
Events are not synced. All GameMaker Server will do is sync some variables (like x, y, sprite_index) to other clients. Do you have your code both in the player object and the other player object? The other player object will be responsible for drawing whatever you want to be visible for the other players not under the user's control. If you want to share code, you can create a common parent object to both the player and other player object.
AUGEgames (Topicstarter) on 12 Aug 2020, 00:14:12
Hey, I just wanted to say that my player characters are weird because of easier math and collision. They have draw event which corrects the coordinates, executes draw_sprite... and draw_line code lines. In VS mode however it scraps the whole draw event like it never happened so it doesn't do any line from draw event. I hope it's clear now.