How to make actor stay on moving platform?

VGXVGX Member Posts: 796
edited March 2013 in Working with GS (Mac)
How do I make an actor stay on a moving platform when it moves left and right?
I don’t want to keep pressing move so my actor walks as the platform moves. I have tried the constrain thing but actor gets stuck on platform and won’t jump off. Please help.

Thanks

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Please use descriptive discussion titles. I've edited yours.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • ashtmjashtmj Member, PRO Posts: 405
    Hey there! still haven't finished a template with all this unicorn apocalypse business going on :)

    here is what you need for this

    a real global attribute named "ledge speed"
    a Boolean global attribute named "on a ledge"

    constrain your players speed to what ever speed he normal walks at + ledge speed

    example:

    If right walk button is down
    Constrain players self motion X to 80+ game.ledge speed

    then if player collides with a moving ledge make a rule in the ledge,
    constrain game.ledge speed to self motion X

    then in the other wise,
    change game.ledge speed to 0

    so if the player is on the ledge he will move with it, and if you press the right button it will add walking speed + the ledge speed

    hope that helps :)
  • VGXVGX Member Posts: 796
    edited March 2013
    Hey there. The thing is I don't want to walk with the moving platform. I want the actor to stay on the platform without having to move the actor.
    So actor jumps on platform and let the platform take me from a to b, without me pressing any buttons.

    Then I can jump off with no probs, because when I try the constrain the actor gets stuck on the platform and won't jump off.
  • VGXVGX Member Posts: 796
    Help please?
  • VGXVGX Member Posts: 796
    Surely someone here knows how to do this? I need this urgently please
  • PixelPunPixelPun Member Posts: 324
    Well I have never tried anything like that.. But my guess would be go into the actor that is the platform you want to jump on and move the friction up in the physics option. I'm not sure how your game is set up, but I believe you would need gravity for this to work. If you set the friction higher than on the walking surface the actor should stop on the surface that has more friction.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Have you tried When player collides with actor [ledge] Constrain Attribute self.motion.Linear Velocity.X to game.ledgeSpeed?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • VGXVGX Member Posts: 796
    edited March 2013
    This just looks messed up now. Can someone please do me a template with -

    1. Moving platform - left to right
    2. Actor jumps on platform and gets taken from point A to point B.
    3. Can jump off the moving platform and jump back on without geting stuck

    I will pay £5 what ever that is in dollars or I can do you logos. Please, Thanks
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    $7.58 US.

    This is £10 but it looks like it contains a moving platform (you may want to confirm before you purchase): http://www.deepblueapps.com/platform-templates/

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • VGXVGX Member Posts: 796
    I have this template already. The problem is the actor does not just stay on the platform. I have to keep pressing the forward/move button so the actor walks with the platform.

    I want the actor to jump on the platform and stay on the thing. without me having to walk the actor as the platform moves. I want the actor to jump on, I take my fingers off the screen and watch the platform take the actor from one side of the screen to the other.

    How do I do this please?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited March 2013
    Right, I understand what you want and I didn't realize (it's not clear from the video) that that template doesn't contain that feature. Platformers are really not my area of expertise so I won't be able to help out more.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Fal01Fal01 Member Posts: 460
    Hi @VeiraGames,

    In my game Alien hopperz i've got 1000 frictions on the moving platform and 600 on the player.
    Maybe you could play about with the friction attribute.

    It’s not a bug – it’s an undocumented feature

  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    edited March 2013
    Use a boolean set to false. When the actor touches the platform, change the boolean to true. And when that boolean is true, have a rule that constrains the actor to the platform. Then in otherwise, when the platform reaches a certain X coordinate, change attribute on the boolean to turn to false, and have no rules for false.
  • VGXVGX Member Posts: 796
    edited March 2013
    @SlickZero thanks. @Socks by the way I didn't see ashtmj post. People keep merging my post so haven't seen it till now. Sorry @ashtmj only just realised. Thanks. Heres a big thank you to you lot who answered. Free logos coming soon
  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    @VeiraGames - I understand your frustration. Although, I don't think you should give up on GameSalad. There is an answer, and I understand you are in a pinch, but it's just a matter of waiting for someone to help steer you in the right direction to get done what you need to get done.

    Lots of us are just coming down from a 2 week marathon for the Gamespot Contest, and may not be back on par with forum help, yet.

    I hope you keep at it, and get the help you need, and get it figured out. Stick to this thread, and post your progress, or ask for more help, even though it's taking a while to get the help you need right now.
  • SocksSocks London, UK.Member Posts: 12,822
    edited March 2013
    Attached is a quick effort playing with friction and density, it seems to work pretty well (although I don't quite know how you have your project set up).
  • VGXVGX Member Posts: 796
    @SlickZero I understand. Sorry and thanks again. :)
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    @VeiraGames

    I have attached a very stripped down version from what I used in my game LAD ....

    Press left to move the pink block over the lever, this switches the mechanic to make the hanging platform start to move, when it is in range, press right and then up to 'jump' and hang on to the platform. When it reaches the other side (you will not be able to move once constrained on to the platform) you will drop off and are free to move again.

    This is the principal you are looking for, just not on top of the platform but hanging from underneath, it can easily be adapted though to have you standing on top of the platform.
  • SocksSocks London, UK.Member Posts: 12,822
    edited March 2013
    ///
  • VGXVGX Member Posts: 796
    @Socks @beefy_clyro thank you for these. I honestly mean it
  • SocksSocks London, UK.Member Posts: 12,822
    @Socks @beefy_clyro thank you for these. I honestly mean it
    My one might not be ideal for what you need, but it might give you a few ideas that might lead somewhere useful.

    Another option I'm always tempted to think about when an actor needs a sudden qualitative/characteristic change is to kill off the old actor and spawn another one with a different set of rules - i.e: (as a quick and rough example) when your actor hits the platform he spawns his replacement (and is destroyed himself) - his replacement has a rule that tracks the platform - as soon as he leaves the opposite happens . . . or something like that.
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Yeh not sure what this lack of spirit is all about! The fact is, theres many more users now than what there was .. This makes it lose the 'you know everyone and everyone helps everyone in the neighbourhood' feel.
    The community is still the best I have witnessed.

    Between mine and @socks, there is plenty there for you to be able to adapt it to your needs.

    For some reason @socks, I love the simplest of things like the way you make your cubes roll over all the time when they move :)
  • VGXVGX Member Posts: 796
    @Socks your one is precisely what I was after. because when I tried it the platform would just slide under the actors feet. and when I tried constrain, the actor would get stuck and wouldn't jump off. But anyway its sorted now thanks you you. Thank you very much!

    beefy one is a bonus. got a new idea to add to my game after testing that out. thank you to
  • SocksSocks London, UK.Member Posts: 12,822
    I love the simplest of things like the way you make your cubes roll over all the time when they move :)
    Ah, the cheap tricks are always the best, ramp up the 'grippy' value and take all the credit. ;)
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    @VeiraGames Glad we could help between us ... Now where's that fiver ey? haha Only joking, good luck with your game

    @Socks The good ol' Grippy™ huh ... aka Friction in GS terms.

    Whats that? New tagline ...

    The answer is most probably: AAA*sin(self.Time*BBB)+CCC ... If not .... turn up the freakin' Grippy™
  • VGXVGX Member Posts: 796
    @Socks @beefy_clyro This is just a little designs I know it doesn't explain much but I want to make a platformer games. but can't decide which to go for. A lot still might change but for now this is what I have to show.
    Image and video hosting by TinyPic Image and video hosting by TinyPic Image and video hosting by TinyPic
  • SocksSocks London, UK.Member Posts: 12,822
    @VeiraGames

    Wow ! :-O Images look great !
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Be interesting to see what direction you are actually going in with these, previews look cool
  • VGXVGX Member Posts: 796
    @Socks Thanks. But still loads to do and that little template has removed a whole lot of stress
Sign In or Register to comment.