How do I ai enemy?

From the Asset Store
Units do not overlap each other and use different ways if there are several free ways.
  • How do I make an ai enemy that shoots I'm making an top down shooter but the enemys are Terrorist that have guns and can shoot

  • I personally like to use the idea of states. The idea being that a unit ( in this case your enemy ) is always in a state of existence. Possible states could be:

    - "Idle" ( sitting there doing nothing )

    - "Patrolling" ( maybe going back and forth between 2 points on the map )

    - "AwareOfPlayer" ( possibly looking at the player/paying attention to what the player is doing )

    - "AttackPlayer" ( actively trying to damage the player )

    - "ReactToDamage" ( reacting to taking damage from the player )

    - etc, etc

    Then its just a matter of putting together whatever conditions you want to have met, to trigger a new state. Like getting hit by a player bullet would trigger "ReactToDamage" for example. The player being too far away from an enemy might mean the enemy defaults to "Idle" or "Patrolling". Perhaps an enemy that is "Patrolling" will stop sometimes and be "Idle" for a few seconds and then go back to "Patrolling" again. The possibilities are pretty much limitless :)

  • Okay how do I make ai move what behavior should i use or is it time to use my back up plan JavaScript

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could use 8 Direction Movement to have your AI Units move around if you want something straight out of the box. Or you could use the "Move At Angle" action and do you're own movement system, though keep in mind that this won't recognize solid objects as barriers, so you'd have to do your own collision checks. I'm not sure what skill level you're at, but there are lots of different options here :)

  • Hello

    I did a Geometry dash clone

    Play here

    rafaeltrigo.000webhostapp.com/geometry_dash_clone

    download here ( In Complete game section )

    construct.net/en/tutorials/construct-tutorials-2525

    you will see that In Automatic mode the player simulate some movements and play automatic , I think it helps , soon I will make a tutorial about this subject

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