Act like boom

If i press a button, my actor totally disappear from the screen.And few seconds later,my actor continue spawn from the bottom again.Please help!!!Thx

Comments

  • carlblanchetcarlblanchet Member Posts: 755
    edited December 2012
    We need a little more information than that to understand what's going on in your project. How about posting your rules below.
  • wolala123wolala123 Member Posts: 249
    @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.^^
  • carlblanchetcarlblanchet Member Posts: 755
    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.
  • wolala123wolala123 Member Posts: 249
    @carlblanchet Sorry,my bad.What i mean is some sort like this http://forums.gamesalad.com/discussion/747/how-to-destroy-all-enemies-on-screen-at-once, but my condition is destroy one actor at once when press a button and few seconds later that actor continue spawn.Hope you can help ;)
  • carlblanchetcarlblanchet Member Posts: 755
    edited December 2012
    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

    Hope this is what you are looking for.
  • wolala123wolala123 Member Posts: 249
    @carlblanchet thanks,it works!!! \:D/
  • carlblanchetcarlblanchet Member Posts: 755
    Great! :-bd
  • wolala123wolala123 Member Posts: 249
    @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
  • wolala123wolala123 Member Posts: 249
    *save 1st 1million coins only
  • wolala123wolala123 Member Posts: 249
    Nvm,its ok already
  • carlblanchetcarlblanchet Member Posts: 755
    So were you able to get it to work?
  • wolala123wolala123 Member Posts: 249
    @carlblanchet able work and already submit to apple
  • carlblanchetcarlblanchet Member Posts: 755
    Awesome news! Congrats!
Sign In or Register to comment.