In many of the Construct 3 platform game tutorials, the authors recommend handling enemy movement by a) using the 'simulate platform' action to move the enemy, b) using an instance variable to handle direction of movement, and c) checking for collisions with invisible boundary sprites in order to know when the enemy needs to change direction.
The first two items make perfect sense, but I've often encountered weird janky glitches when students use invisible boundary sprites to handle enemy movement calculations. In any given class of 15 students, at least one or two students is likely to encounter glitches which cause their enemies to randomly plummet off the platforms in unexpected ways. Sometimes, this seems to be a function of the frame rate. At other times, it has to do with the collision areas not lining up correctly. In some cases, the student has *never* been able to solve the problem and the C3 forums have also been at a loss to solve the problem.
It seems like a more reliable way of handling this situation might be the addition of minimumX and maximumX instance variables in the enemy sprites. Then, the programmer simply needs to update the values of these instances once when they are populating their layouts. From that point forward, the direction calculations should work just fine without any weird glitches.
Does this seem like a plausible alternative to invisible collision boxes? Am I overlooking something?