Run ForEach loops more than once per object?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Quick question.

    I've managed to get very basic enemy physics working with FastLoops, but it only works if there is one instance of the enemy. Anymore, and the physics break.

    I have a FastLoop that gives the enemy gravity, and a FastLoop inside the gravity loop runs 64 times that will pull the enemy out of the ground and stop the loop once they're out.

    Can I achieve this with a ForEach loop? My enemies X and Y positions are float based so they can fall more than 1 pixel or less than a pixel of course.

  • Hiya

    You need to prevent objects from sinking into the ground in the first place. I am working on your mario fireball example now and it has this exact scenario. I'll respond to your fireball thread once completed.

  • Thanks.

    I just tried that and now I have loops running where it compares the Fixed value of the object to the Alterable Value A of the object (which is where the fixed value is always stored).

    Whenever I try changing a value within the FastLoops I have setup (and yes I'm comparing the fixed value to the ID again) it changes the value for all instances of that object, as oposed to one.

    Any ideas? Sorry if this is too open to understand :pacman:

  • Hey, I would create an example for this, however I don't have time at the moment. But I do have this example similar to this problem (and the mario-ish fireballs): Please login to see this attachment.

    Also, you don't need to save the fixed value of the object being for each looped. You can just insert the "on for each of object" condition under the fast loop one: Please login to see this picture.

    - BartekB

    Join the Click Converse Discord! - Please login to see this link.

  • Hey, I would create an example for this, however I don't have time at the moment. But I do have this example similar to this problem (and the mario-ish fireballs): Please login to see this attachment.

    Also, you don't need to save the fixed value of the object being for each looped. You can just insert the "on for each of object" condition under the fast loop one: Please login to see this picture.

    Thank you, that did the trick :D

    I looked at the example your attached and it seemed pretty confusing so I probably will take a second look at that very soon for my fireball movements I'm working on. Your attachment is the third type of movement people have recommended I use for the fireballs so I need to find which works best, meaning the example is of some help for sure.

    Thanks to everyone for all their help! :)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!