Average of X and Y positions (Identical Objects)

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.
  • [MENTION=25981]DuckJohnn[/MENTION]
    As I can see, you are just creating other objects. But you can't actually find a middle X and middle Y due to count of objects. Which objects we should check?

    Sorry.

  • What are you talking about? I'm not that bad at this >:S I've used Clickteam over 5 years xd
    I want to get the average X and Y coordinates from each duplicate object to two counters. X average from every object and Y average from every object. As I said. It's easy if the objects were different, but this time they are duplicates. They should be able to count so that there are a different number of objects each time.

  • If you want to get average X and Y from TWO objects, then you have to create more strings which will contain that. Because I really have no Idea which objects we should check if there are many of them. Nearest or what? I didn't get it

    Edited once, last by void_17 (May 25, 2020 at 5:51 PM).

  • Hi, I’m still learning a lot, but I think I have a fix for the averages.

    I didn’t use counters, but instead used an active to hold the variables. I’m not sure how much math you can do in a counter.
    The “for each” loop needs two parts, I added the second part and used it to total the position coordinates, and count objects.
    I zero out all the counters each 1 second when you change all of the coordinates.

    Enjoy. It was fun working on someone else’s problem for a change of pace ()

  • Sorry for the slow response. I was elsewhere. This seems to work perfectly. That's how I wanted it to work. Thanks :)
    I tried a bit of something similar before, but for some reason I didn’t get it to work.
    I'm new with "foreach" objects, loops and stuff so I thought something else had to be done in it.

Participate now!

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