How to decrease strenght

LordTarantorLordTarantor Member, PRO Posts: 890
edited November -1 in Working with GS (Mac)
Hi everyone:
Let say that my player is in a room and the walls start to move like to crush him. I want the player to be able to move so he can try to escape, the problem is that if he moves agains the wall the wall doesnt move and I need the walls to keep moving until both walls touch each other.

Comments

  • LordTarantorLordTarantor Member, PRO Posts: 890
    Hey guys I cant figure this out can somebody help me? Please...
  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    Try increasing the density of the walls to an astronomically high number...I saw a pinball game that did this to keep the various bumpers in place throughout the board.
  • JackBQuickJackBQuick Member Posts: 524
    If everything else fails, try:

    Squeeze (demo)

    (I'm sure there's a better solution than this, though.)
  • LordTarantorLordTarantor Member, PRO Posts: 890
    Thank you guys it works great. So that is what density is for... And thanks Jack I like the interpolate for the walls better than the moving to I was using.
  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    Glad I could help!
  • JackBQuickJackBQuick Member Posts: 524
    To how high a number did you have to set the density of the walls? I think I tried 50000 and it still wasn't working properly.

    I'm glad that it worked out -- good tip, BarkBarkCo!

    (I know that I tend to overuse constraints and instances so I was hoping for a physics-based solution.)
  • LordTarantorLordTarantor Member, PRO Posts: 890
    No but believe me, with your rule I only need to use one set of rules. It was like getting 2 solutions for only 1 question. Before, I was using in each wall a move to and it was different values in each one. Now its only a value every 2 walls.
    As my first try I only set the density at 10000 and it worked for my purpose.
  • JackBQuickJackBQuick Member Posts: 524
    Since the two walls meet at the same place, interpolate worked wonderfully -- it didn't matter in what direction each wall was moving.

    I kept playing with this. I wanted to find out whether you could use one actor for an unlimited number of walls. This is what I ended up with:

    The walls are closing in! (demo)

    By having actor attributes for

    1. the y-coordinate where the walls meet,
    2. how wide the path is,
    3. how long it takes the walls to close,
    4. whether the wall is the top wall or the bottom wall, and
    5. whether the walls are opening or closing

    you could use one actor for all the walls. I thought this might help you in case you were thinking along these lines.

    I don't know how much memory is needed for this though. I haven't tested this thoroughly so it might not work on an iPhone.
Sign In or Register to comment.