Turret and Pahtfinding

Get help using Construct 2

Post » Fri Jan 23, 2015 12:42 am

Hi, i cant figure it out how to combine this two.
i have an sprite with pathfinding and it works great, but if i add the turret behavior to that sprite and add a target. My sprite donst move along the path.
any help would be great.
Sorry for my english i hope you understand it .
B
8
S
1
Posts: 34
Reputation: 434

Post » Fri Jan 23, 2015 1:52 am

Both behaviors are trying to rotate the sprite towards their separate goals (Pathfinding towards the path, Turret towards the target), which causes them to conflict. You can circumvent this by having 2 sprites, one for the turret and one for the pathfinding. Stick the turret sprite to the pathfinding sprite (either with Pin behavior or events), this way the turret can turn towards targets and still move along with the pathfinding.

You can see an example of this in the RTS template example.
B
50
S
23
G
17
Posts: 291
Reputation: 12,432


Return to How do I....?

Who is online

Users browsing this forum: DrKoala, plinkie and 10 guests