User Tag List

Page 21 of 21 FirstFirst ... 11 19 20 21
Results 201 to 205 of 205

Thread: Easy Pathfinding Widget (extensionless)

  1. #201
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export Module
    Emerson3's Avatar
    Join Date
    Apr 2014
    Location
    Lafayette, Louisiana
    Posts
    715
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Haha. Thanks Schrodinger,

    I can't wait to try it. Unfortunately, my darn computer has been soooooo slow. I can't do anything. I upgraded to Windows 10 and having issues. Stinks!

    I'm bringing laptop to a computer guy today.

    As far as the pie comment, please forgive me. I've never baked a pie myself, so I don't know the difficulty level. Just a saying people say. Don't know why?

    I'll check the code as soon as I get my computer back.

  2. #202
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    ahahaha no, sorry, I phrased that badly,
    I meant that making this last change you asked wouldn't have been as easy as baking a pie
    (though effectively I sometimes bake very simple pies with just flour, fruit and nuts perhaps,
    but still there's a lot that can go terribly wrong, indeed )

    OK, just to say..

    Good luck with your computer man, hope you'll get it back quick and 100% functional!

  3. #203
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Oct 2016
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm coming back to a project that I was working on awhile ago (had some college courses take over my time). I'm working on a turn based strategy, and am wondering if I can limit enemies to a number of squares based on a die roll. Here's an example:

    Let's say that I have a player that is 7 tiles away from an enemy. On the enemy's turn, he begins to march toward the player, but is limited to a maximum of 5 squares (this is a random number generator by a six sided die). The enemy should either walk up to the square next to the player, or stop when their maximum movement is reached.

    I have the first case working (the enemy walks to the player and stops one square prior to them), but limiting their movement eludes me. Any thoughts on how I might accomplish this? Thanks again for all your help!

    Sent from my Lenovo TAB 2 A10-70L using Tapatalk

  4. #204
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    If you're using the "path_node" function
    (likely, as it's the one I used in all examples )
    you only need to identify the "path_node" of your enemy
    (those yellow squares that get created as "guides" for objects to follow,
    should have path_ID value = fixed value of enemy, if you used examples provided)
    and set "total nodes" value to:

    Min(total_nodes( "easy_path_node" ), max steps +1)

    say you want to limit to,
    say, max. 4 steps:

    Min(total_nodes( "easy_path_node" ), 5)


    If you want to avoid the hassle of identifying/picking a single node,
    you can simply set that "max_steps" value after a dice roll,
    and update and flag the node as "processed" right after it's created,
    so all this simply results in this little single event:

    flag 10 (easy_path_node) is OFF
    >>> set total_nodes (easy_path_node) to Min(total_nodes( "easy_path_node" ), max steps +1)
    >>> set flag 10 ON

    (put this at the bottom of your event sheet, after you set "max_steps")

  5. #205
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Oct 2016
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry it took me so long to get back to you. Thank you for pointing me in the right direction, but I'm having some problems. I'm using the basic example, which suits my movement needs just fine. However, by adding the line you suggested things get a bit wonky. If the path distance is less than the maximum step distance, then everything works as expected. However, if the enemy is farther away then it starts a diagonal march into infinity. This seems odd because the easy_path_engine values put the OUT_next_x and OUT_next_y at the right spot. The easy_path_node does not appear to be created, though (or it is destroyed so quickly that it isn't visible). Any ideas on what might be going on? Thanks again!

    EDIT: Right after I posted this, I figured it out. I had the event inside of a behavior for my that controls pathfinding. Placing this at the bottom of my main event sheet fixed everything!

Page 21 of 21 FirstFirst ... 11 19 20 21

Similar Threads

  1. Multiple pathfinding with Pathfinding Object
    By Erkabubben in forum Fusion 2.5
    Replies: 12
    Last Post: 16th July 2017, 07:54 PM
  2. Pathfinding
    By Limyr in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 28th November 2012, 09:58 PM
  3. pathfinding example
    By method72 in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 27th June 2012, 08:23 PM
  4. 3D menu Widget - Wild Widget Contest entry
    By Czentnar in forum Widgets
    Replies: 16
    Last Post: 26th March 2011, 12:51 AM
  5. The Digit Widget [WIP] (multi-widget)
    By Raylax in forum Widgets
    Replies: 1
    Last Post: 13th December 2008, 11:42 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
  •