Stop wall jumping?

G3ck0G3ck0 Member Posts: 12
edited March 2012 in Working with GS (Mac)
So I found a pretty big problem with my platformer; you can wall jump off of pretty much anything. Platforms and walls etc. It would make it hard to design levels around this, as you could just scale any walls. Can I make it so you can only wall jump certain surfaces, or turn off wall jumping altogether?

Comments

  • -Timo--Timo- Member Posts: 2,313
    I also have this problem...
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    It's not really that wall jumping is 'turned on' it's more that you haven't added correct conditions to your jump behaviors.

    For example if you want to only allow your player to jump off floors and NOT walls you need to distinguish between the two surfaces in your rules.
  • -Timo--Timo- Member Posts: 2,313
    so just make 2 floors and 1 is the jump floor and other is not jump wall?
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    Yes, exactly.

    You'll need to check in your behavior(s) what the player is touching of course and only allow jumping off the floor.
  • -Timo--Timo- Member Posts: 2,313
    ok thxx :DD the only problem is more work now ;)
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    Well even with Gamesalads drag and drop interface, no one ever claimed making a good game was easy (or fast)! :)
  • -Timo--Timo- Member Posts: 2,313
    yes that's true xD (you already helped me a lot, also with your youtube movies, really thx :D can you also look at my other discussion pls?)
  • DeadlySeriousMediaDeadlySeriousMedia ArizonaMember Posts: 838
    edited April 2013
    This makes level design faster

    -Make a boolean that tells the player when his jump is ready
    -Make a Player Y real attribute and constrain it to your players Y coordinates

    Make a rule like this in your platforms/floors/walls:

    -If Player Y is > self.y+(self.height/2) AND is overlap/collide with Player
    -Change Attribute JumpReady to TRUE

    In the player actor just have your jump rule only work if JumpReady is TRUE

    This way the player can only jump if they're on top of the wall/platform/floor.

    Hope I explained that well enough.


    If the JumpReady attribute isn't changing to true make sure you're platforms have a rotation of zero and also try changing this:

    -If Player Y is > self.y+(self.height/2) AND is overlap/collide with Player
    -Change Attribute JumpReady to TRUE

    to this:

    -If Player Y is > self.y+(self.height/1.99) AND is overlap/collide with Player
    -Change Attribute JumpReady to TRUE


    Now you don't need to lay down a second set of floor actors! :D
  • Harry2x2Harry2x2 Member Posts: 1

    how do you stop the jump count of an actor reseting when you touch the bottom/sides of a platform

  • TosanuTosanu Member, PRO Posts: 388

    I did it this way. I constrained a small invisible actor/hitbox underneath the player, that only extends below him 1-3 pixels, and not in any othe rdirection. THAT is the actor i have looking for the player to be on the ground, which then switches on a global OnGround attribute. Once that is active, the jump count resets. Ever since someone(sorry! I honestly forget who!) suggested it to me, I've been using bounding boxes like that a lot in my character behaviors.

  • FantasticTigerFantasticTiger Member, PRO Posts: 1

    Do you think you can share how you do this? I am struggling to get this.

Sign In or Register to comment.