enemy behavior problems

This forum is currently in read-only mode.
From the Asset Store
For problem solving, puzzles, bubbles, platforms and other adventures.
  • 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:

    http://dl.dropbox.com/u/11157144/enemy-behav-test.cap

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • hi and thanks for replying.

    i made a new experiment, and got a little further(still not completely satisfied though).

    heres the .cap:

    http://dl.dropbox.com/u/11157144/enemy-behav.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?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)