How do I make an obstacle passable from one side ?

Get help using Construct 2

Post » Sat Dec 17, 2016 4:32 pm

I'm using Pathfinding to create a top down game. Some obstacle on my layout are cliffs (sprite is a rectangle) . I need them to be an obstacle when you abord them from on side (base of the cliff) but can be crossed from the opposite side (you can jump from the top of the cliff). Any idea on how to do that ?
B
40
S
17
G
5
Posts: 281
Reputation: 6,143

Post » Sat Dec 17, 2016 8:50 pm

Adjust the collision box so that it only covers half of the rectangle.
B
53
S
21
G
95
Posts: 2,442
Reputation: 56,099

Post » Sun Dec 18, 2016 1:09 am

Well, I see what you mean. It won't give the expected result. Rectangle will be hidden and used just used to delimitate obstacles. What I mean is that :
- Imagine a vertical rectangle
- rectangle should be passable from left to right but not from right to left
B
40
S
17
G
5
Posts: 281
Reputation: 6,143

Post » Sun Dec 18, 2016 2:13 am

The pathfinding behavior can't do one way obstacles like that. A solution that comes to mind would've to do pathfinding with events using the "a star" algorithm. That would give more control so you could do one way obstacles.
B
101
S
39
G
134
Posts: 5,588
Reputation: 85,514

Post » Sun Dec 18, 2016 11:51 am

Tanks R0J0
I'm not good enough to recreate a complete pathfinding tool. I'll try a different approach.
B
40
S
17
G
5
Posts: 281
Reputation: 6,143


Return to How do I....?

Who is online

Users browsing this forum: Cassianno, EVAPilot and 15 guests