Skip to content

Additional Things

Other ways to spice up your game to make it more appealing.

  • Lesson
  • 3 min read
  • 19 of 20 in this chapter

How to explode after you die

Did you know that you can make your player explode into little bits and pieces once they get hit? To do this, first enter the node map of the "Player" asset by double clicking on it.

We need what is called a "Debris Explosion" node in order to make our player explode, so search for the node in the search bar and drag it into the grid. The "Defeat" output of the "Defeat" node will be connected to the "Explode" input of the "Debris Explosion" node.

When using the "Debris Explosion" node, you need to provide an asset that the player can explode into once it hits an enemy, so we need to go back to the Asset Library to choose one. Go back to "2D World", and open the Asset Library there. We will be using the "Ball Red" asset, but as mentioned before, any asset will work.

Rename the new asset to "Debris", and return to the node map of the "Player" asset.

Select the "Debris Explosion" node and locate the area labeled "Asset" that has a picture icon next to it. Hover your mouse over it and click on the pencil icon in the top right corner.

Here's where you will add the "Debris" asset you made. Once you have chosen the asset, scroll down and click "Save".

Last, but definitely not least, we want the debris to fall to the floor when we get hit by an obstacle. To do this, select the "Debris" asset from the assets panel and find the "Physics" area on the right side of the screen. Change the physics of the debris to "Dynamic".

Now when you test your game, your player will explode into a bunch of pieces when it gets hit!

Exporting your game

If you would like to, you can export this game by clicking "File", then "Export" in the top left corner and choose what type of platform you would like to display it on. From there, just follow what Buildbox tells you to do, and you will have exported your very own Buildbox game!

That's it!

Congratulations! You have finished the STEMpump Buildbox course! Hopefully, you can now make your own games using Buildbox. You can now impress all your friends and family with your apps and the best part is you did not even have to use any code for it! If you have any questions about the content of this course or want to find out more, do not hesitate to contact us!