hey guys! once again im having some trouble.
this is all basics and ive gone through platform school to try and troubleshoot my issues,but im still at a dead end.
im trying to make a really simple enemy behavior.
meanin,that the enemy would patrol back and forth on his platform,NEVER leaving that particular platform.
im having issues trying to make the enemy detect the player and chase him when the player is on the same platform,but to stop chasing and continue patrolling, if the player goes out of this particular platform. also,im trying to make it so that the enemy tries to hit the player every,say, 3 seconds.
so,if anyone could make some sense to this mess of a code,id be thankful:
You don't necessarily have to use LOS. I see you are using an invisible marker for your enemy already, so if you make an event where the player is overlapping that marker, the enemy could chase the player while he's within it, but then stop when he isn't. Also, if you want something to happen every 3 seconds, then you can use the object "wait"-- which is something I wish I realized a month ago.
Develop games in your browser. Powerful, performant & highly capable.
hi and thanks for replying.
i made a new experiment, and got a little further(still not completely satisfied though).
heres the .cap:
so now the enemy stays on his platform and chases the player,but theres some annoying issues:
first, theres some really ugly random jerking,when the enemy changes direction
second, when you encounter the first enemy near the second, the second one rushes from his platform towards the player,id like to avoid that.i know the problem is because the player is already overlapping the enemyblock sprite,when the second enemy sees him, i just dont know how to fix that.
the third enemy is just weird,because the player is approaching from below,and i dont really know how to best handle that situation smoothly.
anyone up for a challenge n give some hints?