Movable....or not

HappyKat78HappyKat78 Member, BASIC Posts: 173
edited March 2012 in Working with GS (Mac)
Hi All,

I've got a game where a ball drops (using acceleration downwards instead of gravity) when a button is pressed. The ball has movable set to true so once the button is pressed I assign the acceleration and the ball correctly drops. However, before the button is pressed I don't want anything to collide with the ball. To prevent this I tried changing the ball's movable attribute to false and then just making it true once the button is pressed. For some reason though the ball no longer drops when I do this.

Has anyone experienced this? Any tips to fix this?

Cheers

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    The moveable attribute cant be changed in game.

    What you want to do is make an attribute called ballCollideOn (boolean) and set it to false

    when you press the button to drop the ball change attribute ballCollideOn to true

    then in your collide behaviors have them in a rule when ballCollideOn = true

    cheers
  • CloudsClouds Member Posts: 1,599
    Make a copy of this actor without the collide rules.

    When you press this actor it is destroyed and spawns the other actor.
  • HappyKat78HappyKat78 Member, BASIC Posts: 173
    Ahh, both great solutions. Thanks guys!
Sign In or Register to comment.