How do I wait obstacle to be calculated with PathFinding

Get help using Construct 2

Post » Sun Feb 15, 2015 10:23 pm

Hi,

I would like to know if there is a way to know when the obstacle map calculation is finished for pathfinding "regenerate obstacle map" action ?
In my new game the calculation take a little moment and if I don't wait the right time sprites with pathfinding behaviour won't take new obstacles into account.

Thank you
B
14
S
4
G
2
Posts: 190
Reputation: 3,938

Post » Mon Feb 16, 2015 12:28 am

You cant, however you might be able to make a workaround with the regenerate region, if you don't already use that?
B
44
S
11
G
2
Posts: 1,181
Reputation: 6,816

Post » Mon Feb 16, 2015 7:37 pm

Hi, i already use regenerate region but i also have to set a wait to be sure sprite's pathfinding has calculated the obstacle map.
In fact I would need an event to be triggered when regenerate calculation is done.
@ashley do you think it could be an interesting feature to add?

Thanks
B
14
S
4
G
2
Posts: 190
Reputation: 3,938

Post » Mon Feb 16, 2015 9:04 pm

It is always ready the next tick.
Scirra Founder
B
381
S
222
G
84
Posts: 23,975
Reputation: 189,160

Post » Mon Feb 16, 2015 9:40 pm

Ok, good to know!
Thank you
B
14
S
4
G
2
Posts: 190
Reputation: 3,938


Return to How do I....?

Who is online

Users browsing this forum: skrotar and 8 guests