Spawning system and Glitch

Discussion in 'Programming' started by discocar, Jul 11, 2019 at 7:42 AM.

  1. discocar

    discocar Member

    Joined:
    Oct 22, 2017
    Posts:
    72
    Hey guys,

    so I am trying to make a spawning system. so when I have completed two objects an enemy will spawn. This is what I go at the moment.

    you complete an object you get a point, once you have completed two objects. This is in a separate object in the room, in the step event of the object.

    if(global.ob > 2)
    {
    instance_create(5664,4896,oCarrierShip)
    }

    but I don't think its spawning my object at all. I can't find it on the map.

    Also I am getting a really bad glitch. The snap grid which you see in the Room. won't go away when I am playing the game. haha

    Thanks!
     
  2. Azenris

    Azenris Member

    Joined:
    Oct 30, 2016
    Posts:
    61
    if your global.ob starts a 0, you need to check >=
    Code:
    if(global.ob >= 2)
    
    else you will need to collect 3.

    you can check if its spawning by adding show_debug_message( "hi" ) to its create event and see it its being called
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice