@carlblanchet i got one boom button,when press it, my rock actor disappear from the screen. After few seconds, my rock will appear again. How to program this part?hope i clear my information.^^
Oh I didn't realize you were asking how this is done.
~Rule~ When touch is pressed Change attribute self.position.x to -100 ( = off screen location ) -After 3 seconds- (still in the rule) Change attribute self.position.x to 284 ( = on screen location )
Change these numbers to the numbers you desire, and this should do the trick.
Ok if I understand properly you want an actor that is on the screen to get destroyed when another actor is pressed and then a couple seconds later you want this actor to spawn back on the screen.
To do this: Make a boolean attribute, lets call it GettingDestroyed.
Make 3 actors.
The first one will be the actor that gets destroyed. In this actor: ~Rule~ If GettingDestroyed is true -> destroy actor
The second actor will be the button. In this actor: ~Rule~ If touch is pressed -> Change attribute GettingDestroyed to true -Timer- (still in the rule) After 3 seconds -> Change attribute GettingDestroyed to false
Now the third actor will be the spawner. In this actor: ~Rule~ If GettingDestroyed is false -> Spawn the first actor
@carlblanchet may i ask u something?when i test in-app in adhoc, i purchase 1million coins and it shows total coins value 1million and i puchase again 1million again.It means that total is 2million coins,but after i close app and reopen again found that it save only 1st 1 million coins again.Is my game program or else?Thanks
Comments
~Rule~
When touch is pressed
Change attribute self.position.x to -100 ( = off screen location )
-After 3 seconds- (still in the rule)
Change attribute self.position.x to 284 ( = on screen location )
Change these numbers to the numbers you desire, and this should do the trick.
To do this:
Make a boolean attribute, lets call it GettingDestroyed.
Make 3 actors.
The first one will be the actor that gets destroyed. In this actor:
~Rule~
If GettingDestroyed is true -> destroy actor
The second actor will be the button. In this actor:
~Rule~
If touch is pressed -> Change attribute GettingDestroyed to true
-Timer- (still in the rule)
After 3 seconds -> Change attribute GettingDestroyed to false
Now the third actor will be the spawner. In this actor:
~Rule~
If GettingDestroyed is false -> Spawn the first actor
Hope this is what you are looking for.