best way to Pause an Actor?
sorry if there is an obvious solution that I'm just not seeing, but here's the situation:
There is a rotating and moving actor on the scene that I would like to pause (freeze) upon touch (and unfreeze when touched again). How can I accomplish this? I thought I had to make a pause Attribute (real) that would change to "1" upon touch--based on a Rule. Unfortunately, this isn't working.
I have a follow up question, but I'll wait to see if this one can be answered first.
thanks in advance.
There is a rotating and moving actor on the scene that I would like to pause (freeze) upon touch (and unfreeze when touched again). How can I accomplish this? I thought I had to make a pause Attribute (real) that would change to "1" upon touch--based on a Rule. Unfortunately, this isn't working.
I have a follow up question, but I'll wait to see if this one can be answered first.
thanks in advance.
Comments
make a rule that says
When touch is pressed change attribute game.pause to (game.pause+1)%2
All this does is say when the actor is touched and game.pause is 0 it changes to 1 and when game.pause is 1 it changes to 0
Then in your actor just use game.pause = 0 to fire the rules you made to stop your actor and game.pause = 1 to set them back in motion
Good luck
Dan
anybody?
…add the attributes to control them to that actor
follow @ironDan … great help! … but make it self.pause not game.pause