Pathfinding for turn based game?

Get help using Construct 2

Post » Thu Dec 26, 2013 1:18 pm

Pathfinding behaviour is quite useless for turn based game purpose because it doesnt give access to array of points on found path and can only follow path without much of my input.

Anyone have something done that can be used in case where you want to know points on path and move object by yourself instead for lets say only 3-4 cells or like x ammount of pixels?
B
22
S
7
Posts: 94
Reputation: 1,783

Post » Thu Dec 26, 2013 10:47 pm

could you use the pathfinding nodes and step through them - so you could check the distance to the next node and move there only if it is close enough ?
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832

Post » Fri Dec 27, 2013 3:39 am

If you are not afraid of using plugins, check out this one: http://www.scirra.com/forum/plugin-slg-movement_topic59901.html
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 787
Reputation: 3,786

Post » Fri Dec 27, 2013 11:46 am

Ah right I see now that you can get nodeXAt. It was probably missing from documentation.PKrawczynski2013-12-27 11:56:14
B
22
S
7
Posts: 94
Reputation: 1,783

Post » Fri Dec 27, 2013 11:57 am

Check out the "Pathfinding.capx" example bundled with C2 (in the examples folder, or "Browse examples" from the start page) and check out the "Show Path" group.
You have access to the nodes in an array with the expression pathfinder.NodeAtX()/pathfinder.NodeAtY()

Pathfinding behavior manual article
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
289
S
112
G
94
Posts: 7,333
Reputation: 69,293


Return to How do I....?

Who is online

Users browsing this forum: namaewayukidesu and 20 guests