Discord
Login
Community
DARK THEME

Can someone help me to make a enemy an object and move around back and forth

Because I am tired and I need someones help please.

https://microstudio.io/i/Loginus/enemy/

QuickEngine has enemies moving on platforms left and right as a demonstration of the engine's capabilities.

What I do is I detect if the enemy is to the right or the left of the player and then I make it move towards the player. Here is an example:

update = function()

if enemy.x < player.x then

enemy.x += 1

end

if enemy.x < player.x then

enemy.x -= 1

end

end

thanks man. it seems like it should work (i think)

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community