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
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