Resuming From Pause Issues
iPhoneDevForMe
Member Posts: 362
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!
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
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.
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!
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.
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.