[Behavior]PathFinder

Post your completed addons to share with the community

Post » Wed Dec 12, 2012 8:23 am

@jerniganj: Well, at the time of coding, the plugin was using the whole layout.
Maybe something has changed in the insides of C2 (I don't really keep this plugin up to date), maybe you're doing something wrong.

Unfortunately without studying your capx I can't guess and give an answer there.
Post it in this thread and I (or some other members) will have a look at it.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Wed Dec 12, 2012 9:08 pm

Thanks Kyatric! I have posted my capx here: https://dl.dropbox.com/u/126021636/mars_v1.capx

i set the window size to 1000x700, and the layout size is 3616x3616 (divisible by 32). There are only 2 main things going on in the capx. One is the click once on screen to move player to that location, the second is to click and drag to scroll around the map.

My only problem is that when i drag the background past the window size and click, the player will not move. If i click anywhere inside the 1000x700 area, the player does move. Thanks if you or anyone can figure out what happening!jerniganj2012-12-12 21:28:33
B
3
Posts: 4
Reputation: 733

Post » Wed Dec 12, 2012 9:41 pm

[QUOTE=jerniganj] Thanks Kyatric! I have posted my capx here: https://dl.dropbox.com/u/126021636/mars_v1.capx

i set the window size to 1000x700, and the layout size is 3616x3616 (divisible by 32). There are only 2 main things going on in the capx. One is the click once on screen to move player to that location, the second is to click and drag to scroll around the map.

My only problem is that when i drag the background past the window size and click, the player will not move. If i click anywhere inside the 1000x700 area, the player does move. Thanks if you or anyone can figure out what happening![/QUOTE]


I was able to figure it out! Very sorry, after posting this i looked at the code i was using from the example capx and realized that there was a limitation comparison set for Mouse.Y < WindowHeight and Mouse.X < WindowWidth. I just changed those to LayoutHeight & LayoutWidth and all set! Still learning. thanks for your response, I appreciate your support
B
3
Posts: 4
Reputation: 733

Post » Thu Dec 13, 2012 10:50 am

@jerniganj: I'm glad everything's working as intended.
Thank you for notifying you had fixed your issue .
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Sat Jan 05, 2013 4:59 pm

I've been making an isometric game and using 00rez's Pathfinder plugin. However, it uses the visual extents of an object as a blocker and I need to use the collision polygon instead (since an isometric view projects tall objects up, but you only want the bottom of an object to block pathfinding).

Kyatric--Does your plugin use the collision polygon to eliminate A* nodes from the valid pathing space? Sorry, I can't tell from the examples given.
B
6
S
1
Posts: 11
Reputation: 570

Post » Sat Jan 05, 2013 7:43 pm

Awesome stuff! Should have some fun with this one ;)
B
15
S
5
G
7
Posts: 877
Reputation: 5,650

Post » Sun Jan 06, 2013 12:14 pm

@DrDeleto: It does use the collision polygon of the object types you set as "Obstacles". If the polygon is on a "virtual cell" (the behavior divides the layout in cells) then the cell will be marked as "unwalkable".

@procrastinator: have fun Kyatric2013-01-06 19:45:19
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Sun Jan 06, 2013 7:38 pm

@Kyatric, I have been :) I've waited so long for a decent pathfinder to continue an idea I started in BlitzMax many moons ago, but never finished. My code got very messy very fast ;p Thanks for developing such a nice, simple to use pathfinder!
B
15
S
5
G
7
Posts: 877
Reputation: 5,650

Post » Sun Jan 06, 2013 7:47 pm

@procrastinator: well you're welcome, even though I thought rez's pathfinder was even simpler to use (and handled real time (every tick) path generations).
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Sun Jan 06, 2013 8:22 pm

@Kyatric, ahhh I must've missed that one.

I don't think I need path generation every tick. Yours seems to handle that fast enough by setting a destination with the mouse. Also I like how I can just place objects on the layout without any regard for a grid with yours. Leaves time for more creativity ;)

I'll be sure to check rez's too!
B
15
S
5
G
7
Posts: 877
Reputation: 5,650

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 4 guests