User Tag List

Results 1 to 5 of 5

Thread: Problem: Advanced Path Movement - Selecting the closest node?

  1. #1
    Clicker Multimedia Fusion 2
    GreenOnion's Avatar
    Join Date
    Oct 2012
    Location
    Sweden
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Problem: Advanced Path Movement - Selecting the closest node?

    Hi, I'm having a problem in figuring out a functional way the Advanced Path Movement extension would choose the node with the smallest distance to the current one, traversing to it/adding it into the 'journey' - without it selecting the current node itself or something else that's just as silly.

    The attempts so far:
    I first tried gathering all the nodes (through a fast-loop) and adding them into the Sort X extension, hoping it could spit out the distances sorted into shortest to longest - Which it did.. But without any documentation on the extension, I couldn't get the "GetAdress" expression to work - nor anything else - at this point the algorithm became such a mess to handle, and it seemed to select nodes at random. A while after that, it decided to stop cooperating with me completely.

    Alright then, fair enough. I then decided to flip the algorithm: run a fast-loop and insert the loop index into an array, with the position dependent on the distance from the current node to the fast-loop ID node. Then I'd run a second fast-loop, which would Bubble sort (http://en.wikipedia.org/wiki/Bubble_sort) the array. This didn't come close to working when I tried it, giving similar results like the past attempt.

    Okay, then I just did a fast-loop testing between all the nodes, checking which one would be the shortest (If X < Y then set Z to X; else end) but that way - It just kept selecting the current node all the time, even if I tested if the current node = the fast-loop index. Frustrated, I gave up trying.

    *Sigh*

    Could anyone give me some help, detailing the correct way of doing this? I've slept on the problem for two days but I can't wrap my head around it - And because Google couldn't spit out an answer, I'm trying here.

    Thanks in beforehand.

  2. #2
    Clicker Multimedia Fusion 2
    GreenOnion's Avatar
    Join Date
    Oct 2012
    Location
    Sweden
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    *Bump*

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export Module
    Skyhunter's Avatar
    Join Date
    Jan 2007
    Location
    Croatia
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I didnt use advanced pathfinding, because of a similar reason, it is very uncooperative and has issues. I suggest that if you are able to code your own pathfinding. It is much better when you can make pathfinding to meet your own needs.

    Otherwise an example of your problem would be nice.

  4. #4
    Clicker Multimedia Fusion 2
    GreenOnion's Avatar
    Join Date
    Oct 2012
    Location
    Sweden
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, I suppose you're right. The Advanced pathfinding extension only likes to do one thing, it seems, and becomes distressed if you'd try to mutate it into other uses. I'll code my own pathfinding and make use of that instead.

    Anyway, thanks.

  5. #5
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Maybe you can use this, or at least get ideas:

    Node Example
    Author: nivram
    Genre: example
    Extensions Needed: none
    Description:
    This is a simple node example. It can be adapted for enemies to chase a player, path movement, and other things.
    Instructions:
    Move the player with the arrow keys.


    Link:
    http://castles-of-britain.com/mmfexamples-m.htm

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

Similar Threads

  1. path movement : goto node name
    By arthurh in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 24th October 2013, 10:05 AM
  2. Advanced path movement problem
    By mega21 in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 27th June 2012, 02:12 PM
  3. Advanced path movement Node Problem
    By StingRay in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 28th July 2010, 05:41 PM
  4. Path Maker (Advanced Path Movement) for BIG levels
    By StingRay in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 22nd June 2010, 02:14 PM
  5. Path Maker for Advanced Path Movement
    By Willi Leopold in forum Extension Development
    Replies: 9
    Last Post: 15th November 2006, 03:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •