Setting the "player" to the X and Y position of an object, when there's more than one

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.
  • Help! I've had so many problems with using the X and Y coordinates of actives objects! I really don't understand why it doesn't work with anything I put into my engine.

    I'll try and explain the problem as best I can...

    Basically, in my platformer game, I have at least 5 "buzzsaws", which move left and right in a level. If you hit them, you get sucked in/torn apart and die.

    So I have a kind of timer, which basically counts down from 10, and the player sinks a bit until it hits 0, just for effect.

    HERE'S the problem:
    I've made it so his X position is the same as the Buzzsaw the whole time (only when overlapping the Buzzsaw)
    And I've made it so his Y position is +1 until the timer hits 0. Once the timer is 0, his position is in the centre of the Buzzsaw.

    But it ONLY works properly if there's only ONE buzzsaw in the level. If I have any more than one, it's really random, and I can't quite get my head around what's causing the problem...

    I've ditched about 3 gimmicks in my engine because I just can't figure it out. Anyone who has the slightest idea of what I'm trying to explain, could you please help?
    I'll love you forever

    Edit: I've attached a lil' piccie to show what I mean

    Please login to see this attachment.

    Edited 3 times, last by Zebedy (November 8, 2016 at 2:35 AM).

  • You have to let Fusion know which buzzsaw you're talking about, otherwise it'll choose one at random (or the first one - or most recent one - that was created, not sure). You have to do this in the conditions

    So, this will result in unpredictable behaviour:

    -countdown("Buzzsaw") > 0
    -set Y("player") to Y("player") + 1


    But this will make sure only the correct buzzsaw is taken into consideration, because you specifically single out a single buzzsaw in the conditions, so Fusion will know to only use that buzzsaw in the subsequent actions:

    -("buzzsaw") is overlapping ("player")
    +countdown("Buzzsaw") > 0
    >set Y("player") to Y("player") + 1


    You've obviously got the "buzzsaw is overlapping player" line somewhere already. But you probably also have an event somewhere that doesn't include that line in the conditions, an this is probably what's causing your problem

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

  • I feel like that should definitely work, I've made sure every event has:

    -("buzzsaw" is overlapping ("player")

    And it's still not really working. But if you aren't aware of any randomness with X and Y positions acting up in Fusion, it might be something else I've done...hmm.

    Thanks for the quick reply Volnaiskra, looking forward to playing the full version of Spryke by the way!

Participate now!

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