• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Object dont appear :(

O

okatz1992

Guest
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.
 
You are following a tutorial written in GMS 1.4, but you are using GMS 2.

instance_create_layer(room_width, position -spread/2, NamekTreeUpside,NamekTreeUpside);
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?
 
Top