How do I walk around objects?

Get help using Construct 2

Post » Fri Mar 06, 2015 11:50 am

Hey there,

everything fine so far, but I cant figure out one thing. I have on layer that I walk my Character around by Mouse ( it's a Point'n'Click Adventuer ). Sometimes there are objects the Character can walk around. e.g. the Character can be behind or in front of that Object.

How do I get the correct drawing order of those Sprites?

Thanks in advance,

Spellbreaker
B
5
S
1
Posts: 9
Reputation: 343

Post » Fri Mar 06, 2015 4:46 pm

Do you mean to have one sprite over another?

Just change the Z-Order, either in the layout or the event sheet.
Nothing goes unanswered!
B
24
S
5
G
1
Posts: 434
Reputation: 3,446

Post » Sun Mar 08, 2015 11:30 pm

No I mean for example I have a room with a table in it, and the character is able to walk around that table. Is there any way to get such an effect? I can't figure it out.
B
5
S
1
Posts: 9
Reputation: 343

Post » Sun Mar 08, 2015 11:55 pm

Could you post a capx?
Nothing goes unanswered!
B
24
S
5
G
1
Posts: 434
Reputation: 3,446

Post » Mon Mar 09, 2015 2:22 am

Message: ChefSeth can only post plain text URLS until they have 500 rep. 2 URLS modified. Why?
I think what you want is pathfinding! https://www.scirra.com/tutorials/474/pathfinding-with- line-of-sight and https://www.scirra.com/manual/154/pathfinding should help!
B
5
S
1
Posts: 59
Reputation: 497

Post » Mon Mar 09, 2015 3:12 am

I've been using RexRainbow's Zsorter. It can sort everything on the layer every tick. I don't imagine it's the most efficient way to solve the problem, but it means that when the player is below an object, that object is behind of the object, and when the player is above, the object is in front. This allows the player to walk behind various objects.

Is this what you were asking?
B
14
S
5
G
1
Posts: 189
Reputation: 1,536

Post » Mon Mar 09, 2015 3:14 pm

Yes the Z-Sorting by Y coordinate looks correctly. Thanks @bladedpenguin

@ChefSeth No the Pathfinding itself is not a Problem, it's the drawing order of the Objects in the Same Layer while a Character walks "around" it .
B
5
S
1
Posts: 9
Reputation: 343


Return to How do I....?

Who is online

Users browsing this forum: namaewayukidesu and 9 guests