Resuming From Pause Issues

iPhoneDevForMeiPhoneDevForMe Member Posts: 362
edited November -1 in Working with GS (Mac)
So I have a simple pause system set up (because I dont know how long it will be before we ACTUALLY get pause, nor do I know how it wil be integrated).

I have actors that are falling down using the move behavior, and I have a isPaused boolean. Here is my set up:

Rule - If Attribute Game.isPaused is False
- Move Down (Speed and all that stuff unimportant)
-Rotate Clockwise

So I simply have a button that when pressed changes isPaused to true, and everything stops and pauses the way I want it to; however, when I resume, the actor moves in the direction of the rotation rather than moving down. Any idea on how to properly implement this?

Thanks a lot in advance!

Comments

  • SingleSparqSingleSparq Member Posts: 1,339
    Although I can't help you with the method your using for pause, I'm using this method which seems to work pretty well :

    I have a global pause on-off attribute as well as on each actor that I want to pause i have a pauseX and pauseY attribute. On those actors I set the rule- when game pause is 1 change attribute self.pauseX to self.position.X ( do same for Y)
    And constrain attribute of self.position.X to self.pauseX ( do same for Y) this seems to work pretty good.
  • MagoNicolasMagoNicolas Member, PRO Posts: 2,090
    Does It work With Actor that Have Acceleration?
  • SingleSparqSingleSparq Member Posts: 1,339
    Well I did add in for my character In the pause rule an acceleration of 0 just in case cause he would jitter a bit, so i think so
  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    Weren't they supposed to have pause in 0.9???
  • iPhoneDevForMeiPhoneDevForMe Member Posts: 362
    The issue lies specifically in the rotation. The move down behavior is mapped to the actor, not the scene.

    So if I have and actor with move down, and I rotate it so that the bottom points to the right, it will move to the right instead or down.

    Using move down, it only happens when I pause and resume, when I use accelerate it constantly moves in the direction of the rotation.

    I just want the actor to move straight down and rotate. Gravity is probably my best option, but how is the best way to implement gravity when only some of the actors need to be falling down?

    Thanks for the suggestions guys!
  • iPhoneDevForMeiPhoneDevForMe Member Posts: 362
    @BarkBarkCo

    Yes, and it was moved back. Which release it will be in is unknown, and my game very well may be done before the next release.
  • PortymanPortyman Member, PRO Posts: 409
    You should use a constrain on the rotation of the actor when pause it true.

    Constrain self.rotation to self.rotation.

    See if that works

    Or you could force the rotation to be 0 if you want it to continue to fall down.
Sign In or Register to comment.