jump through a platform and then land on it

scitunesscitunes Member, Sous Chef Posts: 4,047
edited November -1 in Working with GS (Mac)
Anyone have any ideas how you could have a platform that your player can be directly under and then jump straight up through the platform and then on the way down land on that same platform?


  • SDMGSDMG Member Posts: 280
    Hi scitunes,

    you could check the players y-motion if its positiv or negativ (moving up/down) when colliding with your platform...
  • joe_williamsjoe_williams Member, PRO Posts: 50
    You could set a rule up that sees if the player is above or below the platform, and change it from a non- collidable object if the y position is below, and one the player can collide with if above. All you would need is an intiger that's constrained to the player's y position. That's a shot in the dark, but seems sound. Oy?
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Thanks Guys I'll give that a try!
  • SDMGSDMG Member Posts: 280
    Joseph's solution sounds better ;)
  • KamazarKamazar Member Posts: 287
    I actually like SDMG's solution better. I'm might be wrong about something here, but this is how I see it. If you create a platform, and an actor with rules to detect where it is in relation to said platform, you can only use the platform's actor once, since you can't assign more than one variable to an attribute, make sense? You have to make new actors for each platform you put in a level. SDMG's solution seems simpler and'll work with any and all actors as long as you implement a tag. For example:

    If "player" velocity is less than 0, "platform" (or actors with tag "whatever) is non-collidable.
    Else "platform" is collidable.

    And that's it.
  • SDMGSDMG Member Posts: 280
    thank you kamazar ;) after posting my solution i thought at the possibilty that the player could maybe sometimes jump up but not high enough ... only half through the upper platform for example... so with my rule he would get stuck while his y-motion is getting negative and he is overlapping the upper platform...
  • butterbeanbutterbean Member Posts: 4,315
    scitunes, did you decide which method to go with, or has anyone tested any of the samples out?

    If so, I'd like to see details on what rules were placed in order to do this, I could use this for my game :)
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    I have not gotten to that point yet. I am currently working on the graphics. I'll repost when I have had a chance to play around with these different ideas.
  • butterbeanbutterbean Member Posts: 4,315
    Scitunes have u been able to integrate this yet?
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Sorry, I have been working on my immune system game (which is now up). My next game is going to be a twist on a game I found in the app store called doodle jump in which your player is always jumping and it will be crucial to figure out how to jump through a platform and land on it so I will definitely be experimenting with it soon. I'll let you know how it goes.
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    hmmm. I'm thinking this.

    With the jump how to using the thin jumping platform that sits on top of the normal platform, use that with a Rule that says

    Rule: If collides with StandingPlatform
    --Rule: If collides with JumpthroughPlatform
    ---Otherwise: Collide(with instance of StandingPlatform)
  • butterbeanbutterbean Member Posts: 4,315
    If you just want a platform (regular non-jumping or bouncy), you can still implement it this way?

    You implement these rules within the actor: platform? Or player 1 actor?

    Sorry !
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    the rules are for the jumping actor. You will need 2 types of platform actors. Name them whatever you want.

    You just want to know when you have something to stand on but you are not in the middle of the platform. I'll edit the example above.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
  • butterbeanbutterbean Member Posts: 4,315
    So I tested this and it works great except if the player runs into the side of the platform, they will collide with it, but if the platform is high enough, they will go through it and land on it, so right now it only works if you raise the platform high enough for the player not to walk into it :)

    Is there any way of preventing the player from walking into the platform?
  • Stryfe01Stryfe01 Member Posts: 146
    any update on this? I am having a similar issue. The player collides with the side of the platform and it upends my character.
Sign In or Register to comment.