Help with collisions.

cbowers428cbowers428 Member Posts: 176
edited November -1 in Working with GS (Mac)
I have blocks that can fall down but once they fall down I want it so that they are immoveable. My main actor runs into them and it causes them to bump to the side. I have it so that there is a Change Attribute on the blocks so the Moveable is set to false when they hit the ground, but that doesn't fix it. Please Help!

Comments

  • simo103simo103 Member, PRO Posts: 1,331
    cbowers ... you and I are still looking for the same answer. At least I have found out that we can't effect the movable attribute when the game is running.

    http://gamesalad.com/forums/topic.php?id=14681

    Anyone got any ideas?
  • GamersRejoiceGamersRejoice Member Posts: 817
    I had to do something similar to this in order to make a pause feature for my game. What you'll need to do is have the actor that is falling spawn another actor once the first actor collides with the ground. Then constrain the falling box to the new invisible actor that the box spawned.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    GamersRejoice said:
    I had to do something similar to this in order to make a pause feature for my game. What you'll need to do is have the actor that is falling spawn another actor once the first actor collides with the ground. Then constrain the falling box to the new invisible actor that the box spawned.

    I would spawn the new actor and just destroy the old one. Constraining will kill the fps. Just make sure everything in the spawn behavior is 0 to actor. The second actor should be identical to the first other than unchecking the movable box in the physics.
  • cbowers428cbowers428 Member Posts: 176
    there isnt an easier way to do this? i dont understand why i need all those new actors spawning, I have numerous blocks that are in the scenes so this would result in a LOT of actors spawning
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    You could try having restition set to 0 on the blocks and the main actor, and having collide behavior so when the actor overlaps with the blocks. That way the fall but when they hit the bottom they dont bounce and stop, and then the character wont be able to move them.

    Or the other thing is that even if a actor is not movable, you can still interpolate its position. So you can have them non movable from the start and have them interpolate down to get them falling. That way when they reach the ground they cant move at all.

    Let me know how it goes.
Sign In or Register to comment.