How do I Set Position To Object Instance

0 favourites
  • 9 posts
From the Asset Store
*********** Fidget popper tile sets **************
  • So, I have a bunch of jump-thru platforms. I have several objects other than the player using the "fall-thru" function, which is why I am using jump thru. Lots of stuff falling through. Anyway, it seems like, if something is falling through a platform right as the player lands on one, the player also falls through that platform. I tried doing ON LANDED, SET POSITION TO PLATFORM.Y to prevent this, but that sets the players position to the platform instance with the lowest UID. How can I tell it to set the players position to the Y of the platform INSTANCE?

  • I think if you say that "If Player is overlapping Platform" it automatically chooses this instance of Platform for the event so you would only have to say your set to Platform thing i think

  • I was really hoping that would work, but it did not. Pulling my hair out trying to figure out a workaround.

  • do you tried picking the object with its UID?

  • There's a picking option called nearest and furthest. Picking the nearest platform to the character should work.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • do you tried picking the object with its UID?

    There's a picking option called nearest and furthest. Picking the nearest platform to the character should work.

    I feel bad, but I dont really know how to use either of those.

    For the pick nearest, I tried the following and got all kinds of crazy warping around the layout. I did, PLAYERBOX > ON PLATFORM LANDED, then made a sub event that said PLATFORM > PICK NEAREST TO PLAYERBOX.X, PLAYERBOX.Y and the action for that sub event said SET POSTION TO PLAYERBOX.X, PLATFORM.Y. That doesn't seem too well.

    I don't even know how I would go about telling the UID idea to work.

  • Actually, I'm not sure how you have your events set up but it might be easier and less clunky if you just add some kind of condition to your events where the enemy can only fall through the platform if the player is X distance away.

  • Will give it a shot. Thanks!

  • That didn't seem to do it either. I really do think this to be a bug in the engine itself. I did find a workaround though. Make an object 1 pixel below the bottom of the platform pixel, and say IF PLAYER IS OVERLAPPING THIS OBJECT, SET PLAYER.Y TO OBJECT.Y. Its not perfect, but it makes the whole "sinking through the platform" deal not noticeable.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)