AI in Idle Mode (Answered)

Get help using Construct 2

Post » Tue Jul 21, 2015 1:08 am

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"
B
8
S
1
Posts: 74
Reputation: 725

Return to How do I....?

Who is online

Users browsing this forum: Fradno, MathNook and 39 guests