Moving Platform issue

NinjaworxNinjaworx Member Posts: 20
edited November -1 in Working with GS (Mac)
Hey guys, I'm fairly new to GS but I've been going through the tutorials and I have an issue with moving platforms. I'm making Mario style elevator/moving platform (ping ponging up and down). My main problem is the scene has gravity so when I apply Moveable on the platform, it just falls down, even with the density on 0. Is there a property to apply that makes an actor ignore scene gravity? Thanks! :)

Comments

  • AppsterAppster Member Posts: 112
    Hey Ninja, just set the platform to Un-Movable (Moveable = unchecked). Good luck!

    _______________________________________________________________________
    Appster - List New GS Games Here
    Mathstar
  • NinjaworxNinjaworx Member Posts: 20
    I think I'm missing something, because when I tried to uncheck Movebable before, then the platform wouldn't take the commands to move up and down elevator style and just sat there. Is the scene gravity screwing me up and I should be using gravity only on each actor (I'm not even sure if that's possible?)
  • NinjaworxNinjaworx Member Posts: 20
    ahhh, I see. Thanks. Disappointing that the engine can't turn off gravity on objects. Seems kinda standard. :( So faking gravity with acceleration will still work ok if I'm also using acceleration for the player's movement (by tilting the device)?
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    yes, because the built in gravity is just an accelerate down behavior anyway, just on every object on the scene. So it acts the same
  • HotwireHotwire Member Posts: 24
    Got it working but my player actor can push around the elevator if they collide at an angle. Is this a density issue? I need the elevator to never be affected by other actors but still move on its own.
  • HotwireHotwire Member Posts: 24
    When I do that, the elevator doesn't move at all then (up and down looping)
  • HotwireHotwire Member Posts: 24
    Hmmm...now I'm being a dumbass. haha I had Fixed Rotation already on which keeps it upright but I can still push the elevator platform around when my player actor hits it. I also made the density of the elevator 1000 in hopes that it wouldn't be able to be shoved around but no luck. :(
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    make the elevator unmoveable and use interpolate for your up and down loop :)
  • NinjaworxNinjaworx Member Posts: 20
    I'm having a similar issue with moving things distances instead of screen space
  • HotwireHotwire Member Posts: 24
    #JohnPapiomitis. sweet, that works but I'm not skilled enough to nail this yet. :) I used:
    Interpolate - Self.Position.Y to (number)
    thinking it would move that many units, but it seems like the number is coordinates? Any way to use an expression to make it move units/pixel distance instead? That way I can copy and paste them anywhere without tweaking numbers for each by trial and error.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    You cant interpolate + or - a number because the interpolate is constalny firing when applied so that causes the value you want to add or subtract by to change as well

    find out what position the actors add then add your amount of pixels to that then interpoalte to that position so you know how many your moving by. So say your actors at self position y 300 and you want to move 100 pixels. Interpolate self position y to 400

    and to move up and down do this(ill base this example off of the actor being at y position 300 and you wanteing to move up and down 100 pixels. you can then switch to your needs)

    make a rule when self position y is is less then or equal to 300, interpolate self position y to 400

    make another rule when self position y is greater then or equal to 400
    interpolate self position y to 300
  • HotwireHotwire Member Posts: 24
    Thanks guys! I'll try it out :)
Sign In or Register to comment.