1. Hey! Guest! The 35th GMC Jam will take place between November 28th, 12:00 UTC - December 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice

Object dont appear :(

Discussion in 'Programming' started by okatz1992, Nov 9, 2019 at 1:21 PM.

  1. okatz1992

    okatz1992 Member

    Hello Guys, i am using this Video to start with Programming :

    I have done all right to minute 24:10.

    Here is the Code:

    ObjControl :
    alarm[0] =60
    spread = 150;

    var position
    var spread
    position = random(300) +spread

    // Create the pipes in a random Lacation //

    instance_create_layer(room_width, position -spread/2, NamekTreeUpside,NamekTreeUpside);

    instance_create_layer(room_width, position +spread/2, Namek_Tree_Reverse,NamekTreeReverse);

    Jumping Bird:

    if (gravity = 0)

    gravity = 2;
    objCOntrol.alarm[0] = 20;
    // if bird is alive make him flapp//
    if (dead = 0)

    facing = 10;
    vspeed = -20;

    image_speed = 0.5;
    facing = -25;


    But the Sprites ( Objectes ) i want to appear does not ...

    Game is starting but no pipes are showing up...

    Thanks for Help.
  2. IndianaBones

    IndianaBones Member

    Jul 5, 2016
    You are following a tutorial written in GMS 1.4, but you are using GMS 2.

    The third parameter in instance_create_layer() is the layer name as a string OR the layer id. Are you certain that NamekTreeUpside is a valid layer id?

    I just ask because you've also used the same variable as the 4th parameter, which is the name of the object you are creating. Using an object name in the place of the third parameter (which should be a layer) already raises warning signs for me.

    If this part of the code is incorrect, it makes me want to ask, are you certain you have adapted all the GMS 1.4 code correctly for GMS 2?

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