Oh how embarrassing, but programming is not my strong suit..
I'm trying to make a simple mini game, however it's not working out too well when it comes to the enemy movements. Each enemy is a 16 x 16 square with the ball movement in the 4 main directions N/S/E/W. Each enemy has the 'Enemy' qualifier to it, and I'm using alt variable A to keep track of what direction the thing's supposed to be moving in (where 0= west, 1 = east, 2 = north, 3 = south).
Then there's an event where if group.enemy overlaps a backdrop it changes alt variable A to random (4), which should change his direction and get him moving away from the wall (in most cases, of course if that random #'s = the direction he's already going in he'd have to change his direction on a subsequent pass through the code but that's OK).
But it's not working 100% of the time. Sometimes the monster will rebound off the wall which is good. Sometimes he'll just walk right through walls and off the frame. Sometimes he'll rebound off a wall but then fail a secondary wall check and walk right through that one. I wanted to keep the overall enemy code pretty simple as far as them just moving randomly in 4 directions and changing those directions if they strike a wall. I mean this should be really easy to do, right?
Any ideas and thanks!