Sync (p2 the horror)

Posted by KadePcGames
code:
if (bullets >= 1 && image_index > 5)
    {
        //create le bulleto

        bullets -=1;
        b = instance_create(x,y-12, obj_bullet);
        b.speed = 12;
        //Check dir

        if (image_xscale = 1){
        
            b.direction = 0;
            
        }else{
            b.direction = 180;
        }
        gms_instance_sync(b,is_full | isc_local);
    }

The bullet doesen't sync. even with is_full
This is in a step event btw.

Replies (8)

Last message on 21 Oct 2018

Size43 (Administrator) on 30 Sep 2018, 12:46:18
Do you have any code in obj_bullet or in collision events with obj_bullet that might be destroying the instance?
KadePcGames (Topicstarter) on 8 Oct 2018, 02:40:25
Yeah i have it on player even. Sorry for the late response

(on collison with player)
Size43 (Administrator) on 21 Oct 2018, 16:50:39
Wouldn't that just destroy the bullet as soon as you create it?
rggames on 23 Sep 2018, 04:00:30
Also, if ur using gm 8 or 8.1, you should try to replace the && with and, that's how it works on those versions.
Size43 (Administrator) on 30 Sep 2018, 12:46:42
Both && and "and" are valid.
rggames on 23 Sep 2018, 03:54:31
Sorry, i cannot help, i am not familiar with the sync function, i have readed the documentation, and as far as i can see, there are four things to put on the brackets, and i don't know that much, but i think there are three of them. Also, do you know how do the achievement thingy works?
rggames on 23 Sep 2018, 03:58:50
I mean, there has to be four arguments on the brackets abd you put three there, maybe the code is skipping the line, it happened to me one time. I might be wrong, because i am not familiar with the function we're talking about, but at least i tried to help xD
Ryaangu on 28 Sep 2018, 14:53:04
Try using gms_instance_sync(b, is_onetime);