Hi, I’m making a plataformer game like “Super Mario” and I need to do a generical slime enemy for the game that moves jumping, I can’t found any wiki or video only walking enemies and flying enemies but the problem is that the slime enemy moves jumping, stop and jump foward, stop and jump.
For the stop part, expand your timer conditions and actions:
You could try to +add action: deactivate / activate the platformer object behavior to stop / go the slime enemy or you could use boolean variables (true, false).
There are many ways for
slime enemy moves jumping, stop and jump foward, stop and jump.
I’m not sure about your strategy. If path is found is probably generating a random number on every frame. That’s like 60 times per second.
The bigger issue is mixing the platform behavior with the pathfinder. They each want to control the object so they don’t play well together. They’re going to undo each other and cause chaos.
I guess you could use the pathfinder to detect the player and its direction but for movement, I would simulate the left and right keys.
I guess you could also disable the pathfinder before the jump and then re-enable it. The only issue is it will want to continue on its way. Recalculating the path on every frame can be process intense especially if there are a lot of enemies or obstacles.