It seems that whenever I try to make enemies for my click games they always, always overlap the player and won't leave him alone- causing consecutive damages and all around bad feelings. This is even with two events that always try to make sure that the player doesn't overlap the enemy, and the enemy doesn't overlap the player. But it still happens. I've read a lot tonight and it seems to be the general belief that the best-made enemy has detectors on him, just like the player's hero does. That's great, I guess, but what if you want to have 10 enemies in a level? Do you have to make 4 detectors for ALL of them?
I've tried putting enemies on a path movement, which is fine, until you want them to actually do something other than move along the path like stop and attack or wait around for awhile. I guess I could always do the "set maximum speed to 0" thing to have them stop that way, but the path movement seems to be more powerful than what I can get it to do. And don't get me started on object behavior (and how I don't get it still, AHHHH!!)
And also, how exactly does the collision mask work? Where would be the best place to test it, at the center of the enemy's feet on the bottom? I've never used it before but read that it can make my life easier for things like this.
I hate enemy movement design, but it's needed in the game so I have to try something decent. It'll suck if everything is good except the enemy collisions and enemies in general... again.
"Del Duio has received 0 trophies. Click here to see them all."
"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"
DXF Games, coming next: Hasslevania 2- This Space for Rent!
Collision mask allows you to test collisions at a 1px location of your choosing. It's functionally equivalent to using a one-detector custom movement with a 1x1 active detector. If you're testing floor collisions, test the collision mask at the enemy's feet in the event conditions. If you're testing side collisions, test it at the side or wherever.
I very rarely use it. A better idea might be to give all your enemies custom movements, and use a detectorless engine (where you move 1px at a time with a fastloop, and the moment a collision is detected you move 1px back in the opposite direction immediately).
Apparently the PMO can be used to give all your enemies custom movements too, but I never use it.
Or, if you're up to it, give your enemies a custom movement involving external detectors but only use ONE set of detectors. What I mean is using the fastloop and the spread value function, allowing you to go through each enemy with the single detector set every loop.
Or, if you're up to it, give your enemies a custom movement involving external detectors but only use ONE set of detectors.
You'll find that's less efficient than using a detectorless engine, which does the same thing.
He expressed a specific problem and my answer was within the scope of his problem. The question was regarding movement. If he wants line-of-sight etcetera he can add them: line-of-sight detection does not imply MOVEMENT detectors, and would still be more efficient without them.