isaacyoshimario
Member
So i'm making a tower defense game, and i got stuck. I'm making the tower, and i don't want to make a variable for every single enemy to check if that enemy's near.
Instead of putting in a variable for every single enemy, could i just do something like:
var en = instance_nearest(x,y,enemygroup);
instead of replacing that enemygroup with every enemy there is in my game on different lines?
Sorry if this is worded badly, thanks for the help!
Instead of putting in a variable for every single enemy, could i just do something like:
var en = instance_nearest(x,y,enemygroup);
instead of replacing that enemygroup with every enemy there is in my game on different lines?
Sorry if this is worded badly, thanks for the help!