AI in Idle Mode (Answered)

0 favourites
  • 1 posts
From the Asset Store
Units do not overlap each other and use different ways if there are several free ways.
  • Hello everyone,

    I am working on a AI movement (camera looking top down flat map) full 360 deg of movement.

    What I would like is in Idle mode, I want my sprite to look around based on line of site. Not moving! so standing still generating his view:

    8 directional (up right down and left and in-between), this direction then gets stored in a variable and this is his New Facing position (again the actual sprite is not moving) with this information I can generate a path to that location (of course looking for obstacle on the way) then it will move in that direction between lets say 10 pixels up to 500 pixels. it will stop and do this all over again as long as the idle state is enabled.

    a few thoughts would be to set a invisible circle sprite attached to the AI, then generate a position on that object and move in that direction. your thoughts and how you handled this.. thanks all!

    Update: Ok I got this I think, I was over thinking it. all I had to do was find path based on his image point plus or minus x and y locations so it looks like this:

    Find Path{X(Self.ImagePointX(0) + random(-125, 125)) + Y(Self.ImagePointX(0) + random(-125, 125))}

    this will find my Site (direction) and generate the path in that direction, and then I run the move along path. and reset and repeat LOL very cool effect if you want to make some thing just walking around in some sort of "I am board with nothing to do state"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)