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.
I appreciate any help!
you could try this:
Give your slime enemy a platformer object behavior and deactivate default controls.
For the jump part use a timer like in this picture:
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 hope this helps you a little bit…
I’m still have problems about the Stop, Jump, Stop Jump part here are my code right now
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.