Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Tomi |
Hello!
I always got thar error message about the ‘position’ variable in this code:
var mousex=get_global_mouse_position().x
var mousey=get_global_mouse_position().y
for j in cards:
if j==null:
continue
elif mousex>j.position.x and mousex<j.position.x+cardwidth and mousey>j.position.y and mousey<j.position.y+cardheight:
The if j==null: isn’t working or what???
Cards is an array in my game thar contains instances of a card node.