How to stop gravity while using it later in Windows

QuestionManQuestionMan Member Posts: 81
edited July 2012 in Working with GS (PC)
I have a ball that is shot at an angle upwards, I then want it falling all the way down in the middle of the screen. I have my background and buttons set to 'false' on 'movable' and that works fine for them. But when I try to change the ball's 'movable' ability, it says invalid path. (ie. I want to launch the ball after a click, which it does, but right now the gravity is ON the entire time, I only want it affected after launch) Is this just a windows issue or am I missing something? Thanks

Comments

  • developer6810developer6810 Member Posts: 139
    When you mean "after launch," what exactly do you mean in terms of how the ball moves (what happens before launch) and are you saying you want gravity on for only part of the time?
  • QuestionManQuestionMan Member Posts: 81
    I want: Touch button, ball lstays completely still until launches at an upward angle, then falls down to bottom of screen.

    What happens: ball starts falling, touch button, launches upward but still falling
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    You'll need to change its self.Motion.linearVelocity X and Y to 0.
  • QuestionManQuestionMan Member Posts: 81
    Hey Braydon, thanks but the that is already 0. I was trying to turn on and off the 'movable' field but it keeps coming up as invalid, I think that might be a windows thing
  • QuestionManQuestionMan Member Posts: 81
    OK so I've done some testing, I know I must be missing something really simple here. I have an object that if I have the 'movable' field checked, when I preview the objects slowly falls to the floor because of my gravity. I also have a button, when I click it, it propels that object at an upward angle.

    The problem is the gravity isn't supposed to be triggered (at least on that object) until after I click the button.

    To solve this, I'm assuming the 'movable' field has to be unchecked, and when button is clicked, have self.physics.movable changed to 'true'

    Did this, and it wont move at all now. It doesnt seem to recognize the change attribute for self.physics.movable.

    Any ideas?
Sign In or Register to comment.