How do I follow player

Get help using Construct 2

Post » Wed Jul 13, 2016 6:11 pm

How use pathfinder to follow sprite to player position?
For example when i use for main player behavior 8 direction move (top down game)
sprite called 'friend ' should follow player and avoid solid obscales

when friend is close to the player he should stop following

?
B
25
S
8
Posts: 219
Reputation: 2,181

Post » Wed Jul 13, 2016 6:29 pm

Try this events:

Event 1: Every tick
Player- is moving ------------------ Friend- find path to Player.X and Player.Y

Event 2: Friend-on path found-------------Friend-move along path
B
15
S
4
Posts: 63
Reputation: 1,575

Post » Wed Jul 13, 2016 9:24 pm

@BaronLuke89 i try few things
i create new sprite 'dest' for show destination
and i make timer every 0.05 event should set path to 'dest.x' and 'dest.y'
all works well but when 'friend' touch solid obscale he stops and dont move
B
25
S
8
Posts: 219
Reputation: 2,181


Return to How do I....?

Who is online

Users browsing this forum: Anonnymitet, babymumu and 7 guests