Create a new scene with a Node2D as the root
Rename it to Confetti_Cannon
Add a new GPUParticles2D as a child
In the GPUParticles2D properties
Expand the Drawing property
This just ensures that the particles
Appear wherever the flag pole is
Expand the Process Material Property
Add a new ParticleProcessMaterial
Click on the new ParticleProcessMaterial to expand it
Expand the ParticleFlags property
Expand the Spawn property
Expand the Angle property
Expand the Velocity property
Set the direction to X: 0.0, Y: -1.0, Z: 0.0
Set Initial Velocity to min 50.0, max 100.0
Set Velocity min to 1.0 and max to 5.0
Set Gravity to X: 0.0, Y: 98.0, Z: 0.0
Set the Scale min to 5.0 and max to 10.0
In the Scale Curve property
Use a Preset which suits you
Still in the Display settings
If you turn on the Emitting property
You will see a preview of the blue confetti
To make different colors of confetti
Duplicate the Blue confetti node
Expand the Process Material property
Right-click on the ProcessMaterial
Now click on the ProcessMaterial to expand its properties
Expand the Display property
Expand the Color Curves property
Choose a new color in the Color property
Repeat this process for each new color you add
These are the colors I added and the color codes
To add some popping sounds when the cannon fires
download the SFX from the Audio folder within the
Assets folder of the Pixel Adventure zip file you downloaded at the start of the tutorial
Add an AudioStreamPlayer node as a child of Confetti_Cannon
This will play the popping sounds
Add a Timer node as a child of Confetti_Cannon
This will trigger the pops to play
Set the wait time to 0.1s
Attach a new script to the Confetti_Cannon node