Walking AI

0 favourites
  • 5 posts
From the Asset Store
Character Sprite Pack: Walk 4 Directions made in illustrator
  • Im trying to make a game based on the topdown shooter template and was just wondering is there any way to make the ai just walk around pointlessly?

  • If I had to figure this out with my knowledge and no help I would probably place hidden/invisible spots all over the layout and set the player to change directions on overlap.

    Now the smarter guys probably will tell you a bunch of better ways to this and in which case I will learn it too...

    But that's what I would do if I had to figure something out.

    I hope this helps.

  • Thannks! actually got it working (kinda)

  • Lpgfinmarkus, what method did you use?

    I would like to suggest adding the bullet behavior to your AI sprite. Then, in the event sheet, create a condition that says System."Every X seconds". Then create an action that changes the sprite's bullet angle of motion.

    That will allow your sprite to wander around aimlessly.

    There are many methods of handling the sprite going off the screen:

    1. Destroy the sprite. Either in the event sheet or using the specific behavior for that.

    2. Use the "Wrap" behavior for the object.

    3. Create a border around the layout so that the bullet sprites would bounce off them. This can be done by using sprites and adding the "Solid" behavior to them.

    I hope this helps.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Alternatively, give the pathfinding behaviour to your enemy sprites (you can set it off by default) and when they need to walk aimlessly, set it on have them walk to a random valid point on the layout. When they reach their destination, repeat.

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