Yes you actually have those variables all over. I'm thinking about setting a global attribute for that variable so it could be changed on the fly if the variable changes. Also based on your collision system, I was wondering if the movement can continue in the direction of the arrow press until the parent actor collides with a tile, or another actor, or another direction key is pressed. Probably just needs to be tweaked a little. or I need to add a velocity and have an update condition that checks the 2d array map every n seconds where n is the speed divided by distance of tiles in width/height. or maybe its the other way around, it would be distance/speed, because if the guy is traveling at a speed of 50, and the tile size is 24, that should take 2.1 seconds to get to the next tile, or maybe I don't have a good understanding of how velocity translates into pixels in stencly.
If you have any thoughts on this it would be appreciated, basically, lead actor, we will call that your dragon square for now. I would like 3 detections, if it hits a tile, something happens, if it hits another actor of type whatever, something happens, or if a user presses a different key it changes directions.
What I am working on is a combination of a train simulator and a tower defense game. I know it sounds crazy, but I think I have a good idea. Obviously your script comes in handy as train cars will need to attach to each other, and the dragon head gets replaced with a locomotive.