[Behavior]PathFinder

Forum Home Forum Home > Construct 2 Development > Plugins for Construct 2
 Post Reply Post Reply Page  <1234 13>
Author

Moderator
30,807 Rep
Post Options Post Options   Quote Kyatric Quote  Post ReplyReply Direct Link To This Post Posted: 07 Sep 2011 at 9:59am
Ha yes, to open the .capx, you first need the behavior in C2 folders.
Added the info on the first post.

Thanks for the comments and feedback.

Edited by Kyatric - 07 Sep 2011 at 10:01am
Back to Top
2,580 Rep
Post Options Post Options   Quote 00Rez Quote  Post ReplyReply Direct Link To This Post Posted: 07 Sep 2011 at 12:43pm
Amazing this will be massively useful! Thanks Kyatric.
Back to Top
3,670 Rep
Post Options Post Options   Quote Ethan Quote  Post ReplyReply Direct Link To This Post Posted: 07 Sep 2011 at 1:50pm
This is great, much appreciated.
Back to Top
3,457 Rep
Post Options Post Options   Quote Fimbul Quote  Post ReplyReply Direct Link To This Post Posted: 07 Sep 2011 at 3:06pm
Thanks kyatric! That's a very useful behavior, well done!
Back to Top
1,438 Rep
Post Options Post Options   Quote Dabbijo Quote  Post ReplyReply Direct Link To This Post Posted: 09 Sep 2011 at 2:46pm
Job well done!
Back to Top
1,541 Rep
Post Options Post Options   Quote mikepixie Quote  Post ReplyReply Direct Link To This Post Posted: 09 Sep 2011 at 5:03pm
This is fantastic. Not only is it a great behaviour but the Cap explains something else I have been trying to get right as well! Thanks
Back to Top
19,339 Rep
Post Options Post Options   Quote sqiddster Quote  Post ReplyReply Direct Link To This Post Posted: 10 Sep 2011 at 12:01am
This looks great... but how do I get an object to move along the path?
Back to Top

Moderator
30,807 Rep
Post Options Post Options   Quote Kyatric Quote  Post ReplyReply Direct Link To This Post Posted: 10 Sep 2011 at 12:29am
The idea is to move it from the Sprite's position to PathList(nextCell)'s position (object.PathFinder.getCtX(CurrentCell + 1), object.PathFinder.getCtY(CurrentCell + 1)).
I'm working on this for my current game, I'll try to make an example capx out of it.

Edited by Kyatric - 10 Sep 2011 at 12:31am
Back to Top

Moderator
30,807 Rep
Post Options Post Options   Quote Kyatric Quote  Post ReplyReply Direct Link To This Post Posted: 13 Sep 2011 at 12:52pm
Changelog:

13-09-2011: Reuploaded PFDemo.capx and the C2runtime.js from the demo to fix a bug when clicking the GUI panel button, if the panel was showing/hiding and/or the commands fading in/out.
Update to the PathFinder behavior runtime itself (setCellSizeSide). It appeared that the PathFinder was looking for a path out of the layout boundaries.

Let me know if you experience any trouble.

Edited by Kyatric - 13 Sep 2011 at 12:53pm
Back to Top
19,339 Rep
Post Options Post Options   Quote sqiddster Quote  Post ReplyReply Direct Link To This Post Posted: 13 Sep 2011 at 1:11pm
I am still eager to find an easy way for an object to move along a path. Also will this kill my performance if i want to have multiple instances of an object tracking a moving target? Would it work if I just tell them to calculate a path twice, 4 times a second instead?
Back to Top
 Post Reply Post Reply Page  <1234 13>

Forum Jump Forum Permissions View Drop Down