Legacy GM check for player using an item

H

Huntyboy102

Guest
How can I check if a player is using an item and when the item is used it makes a global signal that can be used in an if statement
 
H

Huntyboy102

Guest
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
 
R

r7465

Guest
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?
 
That's actually not what I was saying. :p

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:.
 

TheouAegis

Member
Is the code in the Step Event?

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.
 
Top