unpause spawns actor-don't know how to fix

Hey guys, In the game I am working on I have it st up so that when Touch is Pressed an actor is spawned. pretty simple, but when I pause the scene it spawns an actor, and when I unpause the scene by touching the unpause button while it is in pause it spawns an actor at the same time it unpauses. Is there a way to fix this and still use the pause behavior, since I finally got that working the way I wanted. Thanks.
SM
SM
Comments
make a attribute called spawnoff. have it set to 0
The rules you have to touch the screen and spawn a actor, put those in a rule when attribute spawnoff=0
when you press the button to pause the game, where the pause game behavior is also put a change attribute behavior and change spawnoff to 1
then when you have your touch is pressed rule to unpause game, also put a timer after 1 second with run to completion checked, and put a change attribute behavior changing spawnoff to 0
that will turn the spawn rules off when your pause, then when you unpause the game will turn back on after a second so the unpause touch wont spawn a actor. Sometimes this works sometimes it doesnt or you have to adjust somehting. This is one of those workarounds you gotta keep playin around till you find what works for you
SM
Where are the spawn rules Are you actually using un-pause but then it spawns because a spawn rule is in the background actor? Theres all sorts of reasons I can see this happening but really we need to know more about the way you have it setup.
Or is it you have a pause button and you are not really pausing and instead just spawning something that says pause?
SM
When touch is pressed
and When game.mouseposition.x is > 50
and When game.mouseposition.y is > 50
You have to play with the numbers based on the location. That particular Rule would be good for a button in the bottom left corner that was around 50x50
hopefully that helps you out. And you need to have your un pause button in the same spot otherwise the press on that will do the same thing.
If that solution doesn't work for you you will have to re work how to spawn what ever it is you are spawning.
___________________________________________________________________________________
TEMPLATES AND PROJECT HELP BY TENRDRMER. CLICK HERE!!!
AppSolute Entertainment on Facebook
AppSolute Entertainment on iTunes
http://gamesalad.com/forums/topic.php?id=27242&replies=1#post-204345
SM
___________________________________________________________________________________
TEMPLATES AND PROJECT HELP BY TENRDRMER. CLICK HERE!!!
AppSolute Entertainment on Facebook
AppSolute Entertainment on iTunes