How do I a line of sight AI with Tile movement?

0 favourites
  • 8 posts
From the Asset Store
solution for games like "fruit ninja" and drawing applications
  • So I was following this tutorial on Youtube - youtube.com/watch , but he was creating a plat former but I was making a 2D shooter with tile movement so you can move around the map. With the tutorial he went clicked simulate platform behavior and it was working but with me I didn't know how to get it to work after that?

    So how do I create an (enemy) AI that would try to come after me with Tile movement?

  • You will either need to provide an example project of what you've done, or be more specific.

    Tile movement and platform behavior are normally not used together, so its a little confusing what you are asking.

  • I want this ghost to attack my character by following him and touching him to kill him. How do I program it to move and follow him?

  • I'm no master at this, but I would probably try:

    - giving the ghost the 'bullet behavior'

    - use that to set the ghosts speed

    - then, use on 'every tick' set the ghost direction to 'player x & y'

    - finally, on collision, destroy player 1

    Edit:

    I'm pretty sure this tutorial will have what you need.

  • Here is an example for pathfinding with tile movement.

    dropbox.com/s/yxf61ftg6w6tag1/tilemovementwithpathfinding.c3p

    Both pathfinding and tile movement are a little bit more towards the intermediate level compared to just having something move without steps and obstacles like the beginner's ghost shooter tutorial.

  • I'm no master at this, but I would probably try:

    - giving the ghost the 'bullet behavior'

    - use that to set the ghosts speed

    - then, use on 'every tick' set the ghost direction to 'player x & y'

    - finally, on collision, destroy player 1

    Edit:

    I'm pretty sure this tutorial will have what you need.

    I got a different idea, how would I get the ghost to move from point A to B and repeat that movement?, sort of like a blockade. I feel like that would be less complicated for me

    Edit - Since the topic change Ill just start a new discussion. Thanks for the help from both of you

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It is the same idea. In the example, you click to set a destination, or you would make the destination always where the player is. Instead, you can use an event to trigger when the destination is reached (point a), to set a new destination (point b). And when point b is reached, set the destination to point a.

  • I'm still a bit confused, is there a tutorial out there that explain what I'm trying to do?

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