statement

  1. Z

    GameMaker comparing ID`s

    essentially what i want to do is if (owner.id==other.owner.id) {}; but in case the instace has no owner, it will throw an error, so can i ask instead if (owner==other.owner) {}; this way if owner doesnt exist atleast it wont throw an error. will the both IF`s work the same way, or atleast...
  2. jobjorgos

    GML != vs else statement

    I discovered something very strange in GML. Often, whenever I use the != statement, as you see below, it doesnot trigger where it should: if global.saveweapon != global.weapon{ //this does not work } BUT if i do it this way with the else statement, it triggers correct! if...
  3. E

    Legacy GM [SOLVED] "for" statement for arrays malfunction

    Hello, fellas. I have a small problem with using “for” statement to set all the arrays to 0 by subtracting them while they are not smaller or equal to 0. So when all my arrays are smaller or equal to 0, the object needs to be destroyed. But it does not work as I expected: object is destroying...
  4. I

    GameMaker HELP - if statement question?

    Ah hi guys, i want to ask about these codes i've seen in a demo from Yoyo games y = real(y&$ffffffc0); if( y&$3f>0 ) I have no idea what does "y&$...." mean here?
  5. A

    GML no else statement documentation?

    hi all, is it just me or is there no info on the else statement in the manual (https://docs.yoyogames.com/) ?!?!?! i searched the index, the the word seach, the contents, and nothing! need help! also, is there a function or other way to reverse a sprites subimage order to play the animation...
  6. Gamer (ex-Cantavanda)

    GML The return statement

    The return statement, what does it do? Hiya! I've been busy learning GML recently, and if there's one thing I don't understand, and just can't find a clear answer for (manual, forums) it's what the term returning a value means, and what the return statement does. Could someone explain it in...
  7. I

    Need help with switch statements

    I am basically trying to make it so that the walls in my game have different phases of destruction. I want to figure out how to use it in a switch statement as i feel that it would work better that way compared to a bunch of if statements. (wallhealth = 100; in the create event) I am looking...
Top