how can i leave on a team without ending the game

Posted by rosaskenneth
Im trying to create a team battle game and if the game ends i want to leave the player on a team and join again on other team they like

Replies (5)

Last message on 17 Nov 2019

rosaskenneth (Topicstarter) on 11 Nov 2019, 05:22:54
one more question size43 , ive made an enemy object sync as is_extended, i dont know if it is normal that once the master player created the enemy(is_extended) the other player who join in the game after the creation of the enemy is not seeing the enemy that created by the master player? but the enemy is exist on the master player client, while the next client who joined in the game is not? is there possible fix here?
Size43 (Administrator) on 11 Nov 2019, 22:24:06
For instances synced with is_extended, only the create and destroy events are synced. The instances aren't tracked on the server, which means they cannot be sent to new players that join after the instance is created. If you want full synchronization, you should sync instances using is_full.
rosaskenneth (Topicstarter) on 13 Nov 2019, 07:34:32
Thanks full synchronization fixed my problem but there is a new problem in my enemy object when i kill the enemy it shows an error

ds_map_find_value argument 1 incorrect type (5) expecting a Number (YYGI32)
at gml_Script_XServer_instanceID (line 1) - return ds_map_find_value(ds_map_find_value(global.__instance, ds_list_find_value(global.__instance_idmap, argument0)), "instance_id");
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_XServer_instanceID (line 1)
called from - gml_Script_gms_step (line 610) - __id = XServer_instanceID(__i);
called from - gml_Object_GMS_StepNormalEvent_1 (line 1) - gms_step();
Size43 (Administrator) on 17 Nov 2019, 18:05:54
I've released an update that might address this issue:https://gamemakerserver.com/en/news/83/
Please let me know whether that fixes your issue.
Size43 (Administrator) on 10 Nov 2019, 15:14:19
If you're using the built-in team functionality, you can just call gms_team_join any time you want to switch to a different team.