move and jump problem

trizerotrizero Member Posts: 6
edited November -1 in Working with GS (Mac)
http://gamesalad.com/game/play/4313
Any one have this download ?

how to make actor jump like this?

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Add gravity to y axis. Youll have to play around with it to get it where you want. Make sure you make all your platforms and game objects non movable. The make your rule when whatever button is pressed, for .4 seconds(timer) accelerate up. That should work
  • quantumsheepquantumsheep Member Posts: 8,188
    @John

    That sounds reasonable - but if all your game objects are non-moveable, does that not count out moving platforms - and even moving enemies?

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Making them non movable makes them not fall from the gravity. Im at work right now so i only had a second to play around with this but if you wanted one of the platforms to move left or right but you still dont want it to fall from gravity the quickest thing i could think of is make the moving platform movable and put an invisible actor under it stretching out, changing the restition to 0 on the platform and invisible actor, and collide with it. That way it wil move left or right, wont bounce but still wont fall down from the gravity cause the invisible actor keeps it up. Sorry if theres a easy way, thats all i could come up with right now, but i know itll work.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    And this is something i havent tried but might work. Make the moving platform movable but constrain the y attribute to a position so it wont move up and down but will move left and right. Again i havent tried this one though so im not sure.
  • ToastKittenToastKitten Member Posts: 360
    If key "w" is down
    Constrain Attribute :self.Motion.Linear Velocity.Y TO self.Motion.Linear Velocity.Y +20

    Then, for jet fuel, just add a jet fuel attribute

    if key "w" is down && jetFuel > 0
    Constrain Attribute :self.Motion.Linear Velocity.Y TO self.Motion.Linear Velocity.Y +20

    note that the +20 can be any number, you can play around with it and see what feels the best. Also make sure you check the "Apply Max Speed" box so that the actor won't go crazy off the screen :3
Sign In or Register to comment.