[BEHAVIOR] EasyStar.js pathfinding for tilemap

Post your completed addons to share with the community

Post » Mon May 15, 2017 4:55 pm

Hey @Magistross - thanks again for this plugin - we make extensive use of it and love it.
Once in a while, when things get really hectic, one of our NPC's fails to find a path.

Is there a way to make that NPC like... stop and re-evaluate using the on pathfinding failed event? Right now, she just freaks out and runs through a wall.

Let me know what you think!
B
21
S
6
Posts: 77
Reputation: 1,445

Post » Mon May 15, 2017 5:11 pm

It's important that if an instance fails to find a path, that all its movement related events/behaviors be stopped or cancelled. The "no path found" trigger should allow you to do that.
B
64
S
27
G
24
Posts: 959
Reputation: 18,478

Post » Mon May 15, 2017 6:21 pm

Can you give me some insight into what might typically cause an instance to fail to find a path? I could just dig into the JS, but I'm curious as I'm currently trying to make my character more 'resilient' to it happening if that makes sense!
B
21
S
6
Posts: 77
Reputation: 1,445

Post » Mon May 15, 2017 7:55 pm

Well, I can't know for sure... but if the tilemap changes or if obstacles are added on the fly a lot, I guess the system might have some hiccups.

Maybe updating the core JS file would help... the plugin is kind of outdated.
B
64
S
27
G
24
Posts: 959
Reputation: 18,478

Post » Mon May 15, 2017 9:04 pm

Hm, yea we do add path cost, but not obstacles on the fly. At least I don't think. I'll look into it and get back to you!
B
21
S
6
Posts: 77
Reputation: 1,445

Post » Wed May 17, 2017 8:45 pm

Magistross wrote:Well, I can't know for sure... but if the tilemap changes or if obstacles are added on the fly a lot, I guess the system might have some hiccups.

Maybe updating the core JS file would help... the plugin is kind of outdated.


Pls help!
Unable to load plugin /// fount GetPluginSettings global but is not a function :roll:
B
8
S
3
G
1
Posts: 8
Reputation: 1,118

Post » Wed May 17, 2017 9:02 pm

@ilyaTyl You most likely copied the files in the "plugins" folder. Simply move them to the "behaviors" folder and it should work.
B
64
S
27
G
24
Posts: 959
Reputation: 18,478

Post » Thu May 18, 2017 6:48 am

Magistross wrote:@ilyaTyl You most likely copied the files in the "plugins" folder. Simply move them to the "behaviors" folder and it should work.

Thank you! Its working now! I check example and it is doesn't have red path. It seems not working
How can i do pathfinding with this plugin without crossing sprites? It is real?
B
8
S
3
G
1
Posts: 8
Reputation: 1,118

Post » Thu May 18, 2017 2:34 pm

Hmm, the demo was done with a previous version of the plugin. The internals changed a bit in the current one, and to get it working like the live version, you have to set the "asynchronous" property of the behavior to "no". The red sprites were being created and deleted in the same tick, so they wouldn't ever show.
B
64
S
27
G
24
Posts: 959
Reputation: 18,478

Post » Tue Jun 06, 2017 11:14 pm

Cool plugin, helped a lot with something I wasn't sure how I was going to tackle. (At least, not without a lot of struggling, haha.) Glad it has tag functionality too, I did some string-crafting of sorts to pass info about the path being checked through the tag and I'm not sure what I would have done without it, lol.

That's all I got for now, just wanted to share my appreciation for it. Maybe I'll have a question with it later though~
B
19
S
10
Posts: 50
Reputation: 1,673

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 1 guest