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

GameMaker Check all objects

U

unbrazer

Guest
Hey, i was wondering if the is a way to check if one variable is equals to 1,for example, in all objects of one type:
if(all of object one type.variablenamehere==1){
then do something
}
 

Tazdraperm

Member
With loop might help:

GML:
var proceed = true;
with (some_object) { // with (all) is also valid
    if (variable_name != 1) {
        proceed = false;
        break;
    }
}

if (proceed) {
    // do something
}
 
Top