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

GML Does an object contain a constant and unique variable?

Discussion in 'Programming' started by Orion31, Nov 7, 2019 at 11:09 PM.

  1. Orion31

    Orion31 Member

    For example, I am building a game with puzzles, and I need to save the states of each button. Is there a built in property to objects that is unique and will always be the same no matter how many times I close and restart the game, or will I have to give each one a unique number in creation code?
  2. TheouAegis

    TheouAegis Member

    Jul 3, 2016
    Instances placed in the room using the IDE will have a constant id for the first room (I think). Then even if you go back and forth between rooms, those ids will remain.

    Instances created in the IDE also have a built-in constant, but dunno how you save via that constant.

    Instances added via code have nothing constant about them.

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