Exploding Coin Chest

0 favourites
  • 6 posts
From the Asset Store
Shamans coin has suitable for workers who work from home because it has player names that must be played alternately
  • Hello! I'm just wondering how to make a chest that explodes and then coins fly all over the map!

    I already have the whole thing set up. Stand on one of those TNT ignite things, one second later.. BOOM! The chest explodes. I have all of that, so don't worry.

    What I'm wondering is, how do I make the coins go everywhere?

    I had all the coins on another layer on top of the chest with four boxes around the coins to prevent them from falling all over the place due to the physics behavior.

    Then I made the boxes invisible and the coins invisible also.

    Then I created an event that says, once you step on the TNT Button, an explosion animation plays on the chest, the four invisible boxes are destroyed, and the coins are turned visible.

    Sounds good in theory, but it doesn't work as intended.

    It's all well and fine until the boxes disappear.

    After the boxes disappear, the coins are like "We're free!!!" and they start going above one another until they form a giant coin skyscraper, eventually falling like the leaning tower of pizza until it actually hits the ground. It's because they're all Physics Behavior, so they can't overlap one another.

    Works I suppose... But I don't want them to stack up like that. I want them all to just explode out of the chest, going everywhere!!

    I suppose I could put each individual coin on a layer on its own, but that's a pain in the butt to do...

    Any theories on how to fix this?

  • I would suggest using Bullet behavior, it also has gravity settings and consumes less cpu. I´ll make a .capx in a blink!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Actually, bullet behavior stops bullets when their speed is 0, so here it is with physics, hope it is close to what you want:

    https://www.dropbox.com/s/g755hzghpec8x ... .capx?dl=0

  • Damn, this is perfect! Just while we're dealing with this function, is there a way to say "Spawn object every ___ seconds"?

  • Bump!

  • just playing around with example I get...

    https://db.tt/ZdZGrlij

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)