How to delete an actor as you execute the pause game behaviour?
Mayhem_Madness
Member, PRO Posts: 168
Hello, I'm trying to delete an actor as I execute the pause game game behaviour, so as the pause game happens I want an actor to be deleted.
Thank you
Comments
Okay... what have you tried?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
I did, when I do pause game, I also put destroy this actor.
Create a paused? boolean equal to False
--IN PAUSE BUTTON--
When pause button is touched, change attribute paused? to True
When paused? = True, pause game behaviour
--IN ACTOR TO BE DESTROYED--
When paused? = True, then destroy actor
@A_Constantin is right but you might need a timer to allow the destroy actor behavior to run before the game is paused:
When Touch is Pressed
Change Attribute game.paused to true
Timer after 0.1 seconds [run to completion checked]
Pause Game
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Hi, thankyou, that worked for me. Sorry for the late reply.