Pathfinding Stepping Stones

Get help using Construct 2

Post » Tue Aug 20, 2013 2:54 am

Howdy,

First off i want to say that this was a much more thorough explanation of my issue before my login session expired and i had to come back here and type it again .

So my issue is that I am trying to have the player build a dynamic bridge from one island to another, as the bridge is built i want the sprite to search for a path from one island to the other treating the tiled background beneath like a solid obstacle and only crossing bridge pieces placed over the bridge, and their z-index was higher than the backgrounds. The issue is that the tiled background stops the sprite from moving at all.

-edit
I have gone ahead and attempted to include a picture as an example of what I am talking about below.


Any help would be Greatly appreciated, Thanks.Nvenom2013-08-20 17:45:52
B
6
S
1
G
1
Posts: 14
Reputation: 453

Post » Tue Aug 20, 2013 8:02 pm

Anyone Got any ideas?
B
6
S
1
G
1
Posts: 14
Reputation: 453

Post » Tue Aug 20, 2013 8:09 pm

Tiled background set to solid?
B
47
S
17
G
81
Posts: 2,223
Reputation: 48,093

Post » Tue Aug 20, 2013 8:26 pm

Yep, i set the background as solid and it just stops the Sprite from finding any path, if you delete the background he will find a path.. but not using the blocks.

here is an example

https://www.dropbox.com/s/0oqg8f0d5j4ndh8/Bridge%20Example.capxNvenom2013-08-20 20:31:32
B
6
S
1
G
1
Posts: 14
Reputation: 453

Post » Tue Aug 20, 2013 8:35 pm

It shouldn't be set to solid is what I meant. Have you checked pathfinding when it isn't a solid?
B
47
S
17
G
81
Posts: 2,223
Reputation: 48,093

Post » Tue Aug 20, 2013 8:50 pm

Without it set as solid he just moves across the water, ignoring the path the player has made.
B
6
S
1
G
1
Posts: 14
Reputation: 453

Post » Tue Aug 20, 2013 9:09 pm

You could create a grid of invisible solid sprites over the water and when the player puts down a bridge tile you destroy the solid tile under it.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,670

Post » Tue Aug 20, 2013 9:18 pm

[QUOTE=ramones] You could create a grid of invisible solid sprites over the water and when the player puts down a bridge tile you destroy the solid tile under it.[/QUOTE]

agree. the solid blocks work well as obstacles so just have them invisible and then destroy when a path block is built.
B
47
S
17
G
81
Posts: 2,223
Reputation: 48,093

Post » Tue Aug 20, 2013 9:25 pm

Hmm.. Ill give it a try, Would a bunch of invisible blocks consume a ton of memory on a mobile device?
B
6
S
1
G
1
Posts: 14
Reputation: 453

Post » Tue Aug 20, 2013 9:28 pm

I have heard that it's more the number of events that fills memory and it doesn't matter how many layouts you have so if you have a large number of blocks across multiple levels it should be fine. You can always export for mobile to test.

Also it was not really mentioned how the building will work but if it's one bridge instantly built then you could always set up some logic to create invisible blocks around the bridge once it's built.plinkie2013-08-20 21:31:17
B
47
S
17
G
81
Posts: 2,223
Reputation: 48,093

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests