• 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!

Code runs without making an instance of the object

K

kim

Guest
Hello? I recently knew Gamemaker and I'm now making a simple game starting from my friend's code.

In my friend's object, the "create" script of "obj_system" object (probably my friend named this) goes on without making an instance of the object. So if I just write

show_message("hello")

in the "obj_system" object's "create" script, without making an instance of the "obj_system" object, I can see "hello" pop up when I starts the game.

However, when I made a new project, I could not see the pop up when I did the same thing ( write the code in the "obj_system" object I named without making an instance of it)

I could not know what was the difference between them.

Furthermore, when I created an event of and object, I always see "Insert Description Here", but I can't see it in the events my friend made. That is really confusing, too.
 
Check the room creation code, maybe the instance is created there in your friend's project.

You can set a default entry for events in the Preferences, under the Object Editor tab.
 
  • Like
Reactions: kim

TheouAegis

Member
Furthermore, when I created an event of and object, I always see "Insert Description Here", but I can't see it in the events my friend made. That is really confusing, too.
That text can be deleted and is just a comment, so it doesn't matter if you have it and your friend doesn't.

If you are in Studio 2, also make sure no objects are listed in any of the layers in the Room Editor.
 
Top