How can I do a complex pathfinding route?

Just started using Construct 2? Post your questions here

Post » Thu Jan 12, 2017 11:01 pm

Hello,

My character need to walk automatically by pathfinding but I need to set more stations besides the start and finish. I could figure out that I need to use the "nodes" somehow. Check the picture to understand what I want to do and help me please because it would be a very essential thing in my game.

Thanks!

Image
B
5
S
1
Posts: 37
Reputation: 441

Post » Sat Mar 04, 2017 10:49 am

Maybe you could split the problem up and compute the paths one at a time?
www.simbucket.com - HTML5 Science Simulations / https://www.airconsole.com/#!play=com.n ... obotrumble - Robot Rumble on AirConsole
B
52
S
17
G
26
Posts: 432
Reputation: 18,084

Post » Sat Mar 04, 2017 11:52 am

I would use line of sight and the path finding behavior together.

When they reach station one reset to station two and so on. Clear obstacles and get line of sight every second or less in your events.

There is a pretty good path finding example included in C2.
Banned User
B
28
S
7
G
58
Posts: 1,229
Reputation: 34,830

Post » Sun Mar 05, 2017 1:58 pm

B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Sun Mar 05, 2017 3:51 pm

Just my opinion but if you go running for a plugin every time you need to do something a little complex you are missing an opportunity to learn how the behaviors work and you will struggle more in the future when things don't work and you have to debug your events.

Plugins can be helpful but some are also known to crash and in a commercial game that would be a terrible thing to have happen.
Banned User
B
28
S
7
G
58
Posts: 1,229
Reputation: 34,830

Post » Sun Mar 05, 2017 11:57 pm

lamar wrote:Just my opinion but if you go running for a plugin every time you need to do something a little complex you are missing an opportunity to learn how the behaviors work and you will struggle more in the future when things don't work and you have to debug your events.

Plugins can be helpful but some are also known to crash and in a commercial game that would be a terrible thing to have happen.

Third-party plugins are nice and all and are probably the way to go if you're concerned about what's easier/what's a better way to do it but...

One scenario I have is where I'm building a gamekit/sdk, and I want it to work out of the box completely, so I'm avoiding third-party plugins at near all costs.
Zelda Gamekit (my project)



Example capxs:

Zelda-Style Inventory

Zelda Health

3-saveslot system

[url=https://www.dropbox.com/s/d4396pwak0oh7q6/ZeldaDialogueSystem.capx?dl=0]Zelda-like Dialogue[
B
51
S
24
G
30
Posts: 536
Reputation: 19,624

Post » Mon Mar 06, 2017 12:09 am

LaDestitute wrote:
lamar wrote:Just my opinion but if you go running for a plugin every time you need to do something a little complex you are missing an opportunity to learn how the behaviors work and you will struggle more in the future when things don't work and you have to debug your events.

Plugins can be helpful but some are also known to crash and in a commercial game that would be a terrible thing to have happen.

Third-party plugins are nice and all and are probably the way to go if you're concerned about what's easier/what's a better way to do it but...

One scenario I have is where I'm building a gamekit/sdk, and I want it to work out of the box completely, so I'm avoiding third-party plugins at near all costs.


Yup and I don't have any plugins installed for that reason. I can do anything a plugin can do using the C2 builtins and I know they will continue working if I update to a newer version of C2.

I used to have some plugins and now some of my older games are basically useless because those plugins no longer work in the newer C2 version and crashes the game or makes it impossible to open and edit.
Banned User
B
28
S
7
G
58
Posts: 1,229
Reputation: 34,830


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests