My objects are no being created
after joining the card battle room in my card game, the player cards are not being created, this is the code:
if gms_self_ismaster(){
//create player cards
var temp,temp_int;
temp_int = 32;
for(var i=0; i<ds_list_size(deck); i++){
temp = instance_create(temp_int,768,obj_p1_card);
temp.card_name = ds_list_find_value(deck,i);
temp.owner = 'P1'
temp_int += 158;
}
}
ps. i followed this tutorial:
https://gamemakerserver.com/en/docs/article/syncing_player_variables/
and put in the step and draw event of the obj_player_1_card and obj_player_2_cards, his custom variables with: gms_self_set and gms_other_get;
also i dont know how to spawn the p2 cards when he join the room.
please help me
Replies (1)
Last message on 25 Jul 2020
Size43
(Administrator)
on
25 Jul 2020, 19:31:15
Keep in mind that there can be only one player object per player. If you want to sync multiple things you should look into
instance syncing or
p2p messages.