local variables

  1. C

    SOLVED Collision checks in local variables executes slower?

    Hello! I found something interesting while messing around with my code. Here it is, clearly following one of Shaun Spaulding's tutorials: In the Step Event: #region//set controls key_left = (keyboard_check(vk_left)) || (keyboard_check(ord("A"))); key_right = (keyboard_check(vk_right)) ||...
  2. M

    Legacy GM Can's set local variables

    I am still a new,something I still don't know now, about variables,i think I did everything I can and read everything I can, but it not works. report...
  3. B

    Passing local variables to scripts without 16 argument limitation? Is there a workaround? (solved)

    Ok, long question. I'm rebuilding a project of mine from the ground up. I'm designing a system where all game world objects can interact with one another. Therefore, there's a kind of hierarchy of variables needed for each quality of an object. I'm trying to do this using scripts with as little...
  4. A

    Problem with creating instance and local variables [SOLVED]

    Hi, I am making a top down pirate (ship) game. I am having trouble with a small portion of code for enemy bullets being able to hit each other. The bullet is shot from within the enemy, so I set a timer on the bullet allowing it enough time to leave the enemy before it can collide with other...
  5. D

    GML Calling variables from script caller

    In a script, is it possible to get the values of local variables of the instance that called the script?
  6. W

    GML Is it ever a bad practice to declare the same local variable multiple times?

    Is it ever a bad practice to declare the same local variable multiple times? For instance: var xx = 50; // some code here var xx = 22; // some code here The reason I bring this up is because of the following situation: var xx = 50; // some code here var xx; // some code here...
  7. F

    GMS 2 Can't increse the value of a local variable

    I've been trying to use local variables and can't figure out why I can't increase the value, here is the code of the script: // Jump State var timer = 0 timer+=1 if //hold the jump key { verticalspeed = -jumpspeed } if timer > 10 state = // change state What am I doing wroing?