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!
Ok, I’m trying to have it so when a player goes through a door it makes all other doors invisible, but I keep running into problems because if statements don’t like global variables
If object using variable = (specific object) or maybe if you own an object make a variable for it and when it's true whatever you want to happen happens?
Did you copy and paste that code or type it out (since there's an obvious error outside of the if statement)? Are you getting an actual error message or is the logic of the code just not working out? Where you do you adjust global.lv1?
as @BattleRifle BR55 was saying obvious error is the if statement
you need a check condition so you would use == instead of =
and the V needs to be lower case @BattleRifle BR55
GML will accept a single equal sign for a comparison (haven't done any testing for YYC, but I wouldn't recommend it regardless). I was getting at the capital V in the first :visible:.
Did you declare the global variable originally as global.lv1=false or did you declare it globalvar lvl1=false? While the latter is ok in most cases, the former is the proper way.