instance variable

  1. M

    GML problem with instance variable

    Hi, i am kinda new to GMS2 and i need some help. I would like to create an instance variable called "hello" but GameMaker do not recognize it as an instance variable (in green) like "score". I would like to understand why it is doing this and how to fix it. By waiting, I wish you a nice day ;)
  2. G

    Legacy GM Instance variable logic problem

    Ok is very simple, I have an object with this in create event: acc_y = -8; and this in the step event: if (acc_y < 12) { acc_y +0,25} y = y + acc_y; Now i thought that the istances of the object didn't share the internal variables. When I spawn one moster his speed will be like +5, but if i...
  3. M

    GMS 2 Which is faster?

    I have a persistent invisible object called obj_game that controls most everything about my game: Which button is pressed, whether or not we're in a cutscene, how far we've gone along in the story, and whether or not the game is paused. [for example, if the variable global.paused = 1, the game...
  4. L

    Drag And Drop Declaring an instance variable in DnD

    Hello, I'm new to GMS and I must be blind. I can't find out how to declare an instance variable from the DnD interface, and the set instance variable function only gives me the built in list of instance variables. Sorry if this is obvious, but thanks in advance for the assistance.
  5. T

    Windows Programming Events in an Adventure Game

    I'd like to create a point-and-click puzzle adventure game (i.e. King's Quest, Sam & Max, Freddie Fish, etc.), but I'm not sure what the best approach is for handling in-game events and triggers. Should I use multidimensional arrays, instance creation variables, or something else? For a...
  6. jana

    Where to put instance variable so it is set before being read

    I'm getting an error, saying that a variable in an object's collision event is not set before being read. I declared the variable in the object's create event: var vib = 0; I want each instance to have it's own copy of this variable that will be updated every time the object is involved in a...
  7. K

    Legacy GM [SOLVED] Checking if inst is not an object

    Hello, I was in the middle of finishing up my pause function when I ran into a spot of trouble in logic. I was trying to figure out how to check that the current instance is NOT obj_GUI since this object cannot run the command draw_self(). How would I go about this logic check? with(all) {...
  8. T

    Windows Finding an Instance with the Lowest Value of a Variable

    I want a character to do things in a certain order, I can't hardwire said order into the code because the player is the one creates it by clicking on instances. So far I've made it so the first instance the player clicks on has the instance variable "selected" set to 1 and the 2nd one gets it...