User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: Fast Loop Not Stopping As Expected

  1. #1
    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
    Jun 2017
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Fast Loop Not Stopping As Expected

    Hello! I am new to the forum and to Clickteam Fusion 2.5 and need a bit of help and where else to ask but the community itself! Basically I am creating a very basic grappling hook for my platform game. I know there are some great examples on the forum and on Castles of Britain however I am wanting something a little bit different. I am wanting something like the grappling hook in Terraria, if that helps anyone. My code may be wrong or there may be an easier way of doing this but this is what I have:

    Pieces:
    Rope Active: 1 Alterable value called Length Set to 1 at Start of Frame, and is not created at start
    Loop "Rope": Add 1 to Alterable Value Length
    Always: Set X Scale of Active Rope to Alterable Value of Length

    Code:
    Repeat when Left mouse is Clicked (and Rope Active Objects=0) Create Rope Active and Start Loop "Rope".
    Negate Repeat when Left mouse is Clicked Create Rope Active

    This is the basic setup of the code where the issue happens. So the Rope Active stretches as I want however when I add something like "When Active Rope collides with background object, Stop Loop "Rope" " It finishes anyway going through the background. I feel like this is possibly a simple fix and maybe I just wasn't sure how to properly use the fast loop. So I just need the Loop to stop when colliding with an object so it doesn't go through the background. My next issue Is I am unsure how to get the (x,y) position of the collision between the Rope Active and the background so the player can start moving towards that position.

    Hopefully this made sense and hopefully someone knows how to help me out on this. If there is a better way of doing this or i you need anymore information please let me know and I will help as soon as I can!

    Thank you for your time,
    Josh

  2. #2
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Sumo's Avatar
    Join Date
    Jul 2008
    Posts
    642
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You need to make sure the collision condition is within the "on loop rope" condition so it checks it during the loop


    Sent from my iPhone using Tapatalk

  3. #3
    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
    Jun 2017
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I will try that! Thanks for the quick Reply!

  4. #4
    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
    Jun 2017
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Sumo View Post
    You need to make sure the collision condition is within the "on loop rope" condition so it checks it during the loop


    Sent from my iPhone using Tapatalk
    Hmm I tried doing this, but wasn't able to figure out how to put the collision on the same line. I did try to add another line of On Loop Rope and Collision between active rope and backdrop, stop loop rope, but this was unsuccessful as well. I may just not be doing it right though as I am new to fast loops.

  5. #5
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Sumo's Avatar
    Join Date
    Jul 2008
    Posts
    642
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Leave your on loop rope code for adding +1 to length.

    Add a new line of code. Add the same on loop rope condition, so now you have two lines of code that use the on loop rope condition. In the same line of code, add the overlap condition. This overlap condition will be right under the on loop rope condition.

    You can have multiple conditions within one line of code. The line of code's actions won't trigger unless all the conditions within that line are true.

    So for your second line of code, it will first check to see if it's doing the rope fastloop. While that's happening, it will check for the overlap condition. If that's true, then for the action you stop the fastloop, which will stop the rope from increasing in length.


    Sent from my iPhone using Tapatalk

  6. #6
    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
    Jun 2017
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Sumo View Post
    Leave your on loop rope code for adding +1 to length.

    Add a new line of code. Add the same on loop rope condition, so now you have two lines of code that use the on loop rope condition. In the same line of code, add the overlap condition. This overlap condition will be right under the on loop rope condition.

    You can have multiple conditions within one line of code. The line of code's actions won't trigger unless all the conditions within that line are true.

    So for your second line of code, it will first check to see if it's doing the rope fastloop. While that's happening, it will check for the overlap condition. If that's true, then for the action you stop the fastloop, which will stop the rope from increasing in length.


    Sent from my iPhone using Tapatalk
    I did try that, and it was unsuccessful as well for some reason, the rope continues to go through the background. With the code:

    On loop rope: Add 1 to variable length

    On loop rope and collision between rope active and background: Stop Loop rope.

    Could it be the fact that I am using variables to do this? I feel like it should be working with those conditions. Its like the active is hitting the backdrop at all.loop.PNG <--click for Picture rope.PNG <-- click for Picture

  7. #7
    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)
    When this gets figured out it would be nice to have a example file.

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

  8. #8
    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
    Jun 2017
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by nivram View Post
    When this gets figured out it would be nice to have a example file.

    Thanks,
    Marv

    I will be sure to get one too you. Your website has definitely helped me out , so it would be nice to give back something.

  9. #9
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Sumo's Avatar
    Join Date
    Jul 2008
    Posts
    642
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Fast Loop Not Stopping As Expected

    Collides with background? Shouldn't it be overlapping backdrop?

    Are you using backdrops or actives? If backdrops, make sure they are set to "obstacles" in the properties. Also make sure the objects you are testing for collision or overlap are on the same layer.


    Sent from my iPhone using Tapatalk

  10. #10
    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
    Jun 2017
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Sumo View Post
    Collides with background? Shouldn't it be overlapping backdrop?

    Are you using backdrops or actives? If backdrops, make sure they are set to "obstacles" in the properties. Also make sure the objects you are testing for collision or overlap are on the same layer.


    Sent from my iPhone using Tapatalk
    I tried it both ways just to be safe and the Backdrops are set right as my player collides with them perfectly. Do you think it could be the stretching that could be causing this? I ran a test and the action point is still in the relative position so I didn't think the collisions would be affected. Thank you for your help Sumo, I really appreciate it!

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Game Of Life - Fast Loop = not that fast :)
    By bad_rick in forum Fusion 2.5
    Replies: 7
    Last Post: 20th June 2016, 07:36 PM
  2. Replies: 2
    Last Post: 27th May 2015, 02:00 PM
  3. Terminate fast loop mid-loop
    By JDWB in forum Fusion 2.5
    Replies: 8
    Last Post: 2nd November 2014, 04:14 PM
  4. fast loop and loop index
    By willow in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 18th May 2010, 01:43 AM
  5. Fast loop within fast loop - platform game
    By Safe in forum The Games Factory 2 - Technical Support
    Replies: 1
    Last Post: 16th April 2010, 07:38 AM

Posting Permissions

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