GML -> check for a colliding instance's variable, then do action <p>I've been trying to do some GML scripting but got totally stuck at some point. I want enemies to attack my main character but without overlapping. So, I would say.</p> <pre><code>//enemy is moving left-to-right... if place_meeting(x+1, y, enemy){ //if there's a collision with another enemy if (other enemy).is_attacking{ // ??? // checks if the colliding enemy is attacking, if true, it should attack as well... is_attacking=true; }else{ //walks } </code></pre> <p>This is an image that describes what I'm trying to get (note that enemies know they should be attacking even though they're not in direct contact with the main character, just because an enemy besides is attacking)</p> <p><img src="https://i.stack.imgur.com/cZhpY.png" alt="What I&#39;m trying to get..."></p>