How do I PathFind Around TileMap Solid

Get help using Construct 2

Post » Tue Aug 12, 2014 6:18 pm

Need some help to pathfind around a tilemap object
In this case a fence around a grassed area(top left corner)

Cannot seem to get the player to walk around inside the open part of the fence, only solutions I could find were to have him turn the other way, or send bullet direction opposite way which is not what wanted!

Example cap
https://www.dropbox.com/s/dpxjoe6w8nfrvbt/helpcapx.capx

Many Thanks
B
9
S
1
Posts: 18
Reputation: 515

Post » Tue Aug 12, 2014 7:37 pm

Anyone :)
B
9
S
1
Posts: 18
Reputation: 515

Post » Tue Aug 12, 2014 7:47 pm

Fixed,
Added variable speed, and isMoving boolean
Added Player is overlapping object
player set pos to
x: self.X-cos(self.a)*self.speed*dt
y: self.Y-sin(self.a)*self.speed*dt

set reticule to player.x player.y
B
9
S
1
Posts: 18
Reputation: 515


Return to How do I....?

Who is online

Users browsing this forum: tarek2 and 24 guests