2 boxes, when collide they destroy

Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
edited November -1 in Working with GS (Mac)
Hey all,

I have a problem:

I have a box game, that when they are touched, they get destroyed. I also have a box that is locked, so it cant be destroyed when you touch it. There will be 2 or 4 on the screen. I want it so that when they collide, they get destroyed. I have that, it works.

BUT

I have it set up so that when there are no more boxes on the screen, the round is complete.

So you can imagine the problem im having, the 2 locked boxes collide, and get destroyed.
Now, the round ends before all the boxes are gone.

Say i have 4 boxes on the screen, i make the 2 locked boxes collide, and they get destroyed. Right after that, the round ends. Any idea why?

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi, I guess you're using an integer attribute, its value set to the amount of boxes on the screen? And on-screen but outside of the play/view area, an actor with When attribute CountDown (or whatever you've called it) =0, Change Scene? Your unlocked boxes, when touched, Change Attribute Countdown-1?

    Make a boolean attribute for every locked box in your scene, called UnlockA, UnlockB, etc. (all set to the default false).

    In your locked boxes' Rules, should be something like:

    When UnlockA is true
    Change attribute Countdown to Countdown-1
    Destroy Behavior.

    Basically, until you change the individual box's boolean to true, it won't minus from the total number of boxes to be destroyed.

    Hope that gets you up and running again.

    :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Hia Gryroscope-

    Yeah ive done that, my problem isnt that they wont be destroyed, but that somehow the game things that there are still boxes on the screen, or there arent.

    Hmmm.

    Still, any help would be great.
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Bump
Sign In or Register to comment.