Creating a lift?

hrsmediahrsmedia Member Posts: 522
edited November -1 in Working with GS (Mac)
I'm trying to do a lift using change velocity (constrain attribute linear velocity). But when I have gravity on, the player actor pushes the lift down when you move on top of it. I have tried using with gravity and without gravity using accelerate down on the player actor.
Does anyone know what is the best way to achieve this? Thanks

Comments

  • JamesZeppelinJamesZeppelin Member Posts: 1,927
    Uncheck moveable in your lift actor
    Use interpolate to change self.position

    I havent tested it but that should do the trick
  • hrsmediahrsmedia Member Posts: 522
    I tried using interpolate but the player goes through the lift, I uploaded the project file
    http://gamesalad.com/game/play/63594
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    don't use scene gravity!!!!!!!

    Put 270 acceleration in any falling actors instead. In the lift use move or move to and set it's density to a very high number (try 1000) that should make it so the collision with the main actor is hardly noticeable.

    TIP: Create a game integer attribute called game.gravity. Set it to 400 or so. In the 270 accelerate behaviors for every falling actor use this for speed. Then if you want gravity to be "stronger" you only have to change the value of the attribute in the main attribute screen and it changes it for ALL falling actors - big time saver!
  • hrsmediahrsmedia Member Posts: 522
    Thanks, that seems to work now! Much appreciated. I used move instead, but now I'm having trouble making the lift go up and down repeat without using lots of timers. Do you know an easy way to do this? Thanks again!
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Use its position.

    Rule
    When self.positionY ≥ blah
    Down Rules

    Rule
    When self.positionY ≤ blah
    Up Rules
  • hrsmediahrsmedia Member Posts: 522
    Of course, I didn't think of that.. Thanks!
Sign In or Register to comment.