Vertical moving platforms throwing me off!

0 favourites
  • 15 posts
From the Asset Store
Throw daggers and hit the most fruit! Watch out for the wind, if you run out of daggers you'll lose the game!
  • I've tried to make a platform in my game move vertically by using

    'Set Y to 100 + sin(time*(360/5))*150'

    and my collision masks all seem to be right but when the play jumps on the platform it just wants to throw them off!

    Any ideas on how I can fix it? My horizontal ones work fine.

    Small example can be found here

  • Can you post the .capx?

  • I don't know if it's the same issue here, but in CC it was a problem if platforms weren't set to integer coordinates. Otherwise you couldn't stand on them no matter what you do.

  • Its very messy because its my first project, and is just an experiment to get down the basics. The object in question though is Sprite12.

    File linked below.

    Capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I just tried your capx and it worked fine for me. Actually looked quite good :)

    If I may make a suggestion - place the lighter buildings on a separate layer to add parallax. Adds a sense of motion :)

  • I just tried your capx and it worked fine for me. Actually looked quite good :)

    If I may make a suggestion - place the lighter buildings on a separate layer to add parallax. Adds a sense of motion :)Are you sure it worked right? It doesn't work on mine properly nor does it work on the web demo I linked in the first post. Its the last moving platform that moves vertically, all the others move horizontally. If your trying the capx move the player so you don't need to run through the whole level.

    Not a bad call on the background either!

  • Yea, sorry. My mistake - he does indeed wander off :/

  • I'm still stumped on this, I've tried paying with the gravity and even physics and I still can't seem to get it to work. :(

  • Same happens to me when playing, the first moving platform wants to throw my off to the left.

    Edit: sorry, so do the others.

  • Before moving the platforms have the player move the same amount as the platform is going to move. The platfom the player is on is found by moving the player 1 pixel down, checking for overlap then moving back to where it was. Basically it does what "overlaps at offset" did for CC.

    http://dl.dropbox.com/u/5426011/c2/vertical%20platforms.capx

  • Hey,

    I've been trying to get your solution working in my game, R0J0, but I'm apparently doing something wrong. Would you mind taking a look?

    db.tt/61FvHuSV

    All the events are on the Misc event sheet, under the comment "Vertical". The platform on the right is the vertical one, by the way -- just watch out for that Goomba. <img src="smileys/smiley17.gif" border="0" align="middle" />

  • Thx R0J0hound

    I was also having some trouble with the vertical move !

    Also I am wondering is it a bug ? Because looking at the example on horizontal move it works fine ! Just wondering why it's not the same with Y and if it is a bug that has to be fixed.

  • SullyTheStrange

    The platform needs to be moved vertically after the player is moved.

    Move the "Plat: Set Y to self.Y+self.MoveY*dt" from event 9 and put it in a new "Every tick" event at the bottom of the event sheet. You'll also want to reposition mario to the player sprite in that event otherwise mario will appear to lag behind.

    Ketoulou

    The key to get it to work is moving the platform after the player.

  • Alright, that makes it plenty less glitchy, thanks! The remaining problems might be issues with my animation system, so I'll try to work those out on my own.

  • IMO It would make much more sense if you use the Sine behavior.

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