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

assign variables

  1. T

    GameMaker Arrays and Memory

    Hello all, I have some questions about arrays and memory usage. I have a background in C and am wondering the following: Is it possible to initialize an array of a set size and not assign any values to any positions and therefore have them as null values? ie. myarray[size]; where size is an...
  2. O

    Trouble assigning variables to instances.

    (Solved then had new problem with new code)
  3. M

    Legacy GM [SOLVED] Trouble With Array

    I am trying to make a main menu using an array in Game Maker, and am using the following code to initialize it in the "Create" event. For the life of me I cannot figure out why it isn't working. I am getting the error: Error at line 1 pos 5: Assignment operator expected. So apparently the...
  4. T

    GameMaker Assign several instances of an object to different paths

    Hej everyone. As the title already states, i would like to assign several instances of an object to different paths i set. Lets say i have an "enemy" object which has a specific behaviour: It follows a defined patrol path. If the player comes near the enemy, the enemy starts chasing the player...
  5. J

    [SOLVED] Assignment not working

    There's a vertical red bar in the line numbers in my create code. The code on that line doesn't work. It's supposed to choose a random number and assign it to a variable, but after debugging I've found the value chosen is not random but always zero (which is consistent with the bad output I'm...
  6. W

    Legacy GM [SOLVED] Assigning code to instances of an object

    Create Event: // pink block position pinkposition = room_width - (room_width * 0.992); // y position of current object instance var yco = ((room_height/2)*1.5); var ycoor = (room_height - yco)/2; yposition = (room_height - ycoor); // setting instance position x = x; y = yposition; //...
  7. R

    Formulas returning NaN [SOLVED]

    I've This code event_inherited(); //parent gives his code slider_value = obj_options_menu_controller.surf_height; instance_create(x,y,obj_vbar); obj_vbar_parent.scroll_power = 20; obj_vbar_parent.slider_px_height = sprite_height; obj_vbar_parent.real_slider_height = slider_value...
Top