Enemy Ai for Top-Down movement?

From the Asset Store
Set of tiles to create a map for top-down games with island theme
  • Hey all, so im working on my new project and setting up the movements for the enemy, which are the scorpions. What im trying to do is get the scorpions to move in a frantic spider like way and have them move back and fourth wandering around the screen until they get close enough to the player and chase after them. Now I use the bullet behavior for them and their movements are 90 angles for the bullet. I got them to kinda move the way I like but not all the way as you can see in the gif below....

    They stop moving after their frantic moving and just stay in one place afterwards.

    I have this coded for them in the event sheet.

    But I can't seem to get them to keep moving and I tried using every tick with it as well. Anyone know how I can get them to keep moving and wander around the screen frantically back and fourth?

    Here are some screen shots to get an idea of their movements im aiming for...

  • In Event 10 you add a value to the directions and don't set them. So after a few seconds direction variables should be above 3 and the events after won't be triggered.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Asmodean

    Thanks so much! It works! Now they move more like spiders just how I wanted them to. I will post a gif of them soon to show.

    Just to show the update of the codesheet of your advice.

  • Complete movement of the scorpions...

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