Particles #6: Killer Fireball Effect

1

Attached Files

The following files have been attached to this tutorial:

.png
.gif

fireball-effect.gif

Download now 3.15 MB
.zip

fireball-particle-effect.zip

Download now 178.68 KB
.png

Stats

3,220 visits, 4,568 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

I assume you know the basics of C2.

You can download a sample capx and skip this tutorial as you may want to explore it yourself.

Foreword

Before we begin with the tutorial let me tell you that there are limitations in what you can do with the C2 particle system. Anything other than basic effects needs a workaround.

What we will do

Let's Start

1. Create a new project

2. Name it as you want

3. Change layer color to pure black (0,0,0)

Fireball Head

- Place a sprite object on the layout.

- Leave it empty or make a small dot in center so you can see and select it in the layout.

- Add the bullet behavior to it

- change bullet speed to 100

- name this sprite object "Fireball Head"

Firebulk

- Make a new sprite object

- load the firebulk sprite into it. the default color is white so you can change it later to any - color you want. For now select the fill and apply this color (250,200,0) to the sprite and close

- add the "pin" behavior

- add the "rotate" behavior

- change blend mode to "additive"

- name this Firebulk

Firetrail

Make a new particle effect

- load the same sprite we loaded for the firebulk

- apply same color fill (250,200,0) and close

- add the "pin" behavior

- change blend mode to additive

- name this firetrail

I've moved the Firebulk from previous step out of window here because it will be pinned later.

Configure particle:

- Rate 25

- Spray cone 10

- Speed -100

- Size 56

- Opacity 25

- Grow Rate -40

- Y randomiser 20

- Size randomiser 20

- Grow Rate Randomiser -10

Firetrail Sparks

- Make a new particle effect

- load the sparks texture

- apply same color fill (250,200,0) and close

- add the "pin" behavior

- change blend mode to additive

- name this firetrail sparks

Configure Particle System:

- Rate 4

- Spray Cone 90

- Speed 100

- Size 10

- Grow rate -6

- X randomiser 5

- Y randomiser 5

- Size randomiser 2

- Acceleration -10

Linking elements with each other

Now a little coding is required

- Go to Event sheet

- Click RMB and select new Group.

- Type "Fireball" and hit ok. (You can comment if you want)

Under the group add the following Event

    System>Every 0.25 seconds

Then add these actions under the event

    System Create Object Firebulk on layer 0 at (FireballHead.x, FireballHead.y)
    Firebulk > Set scale to random (0.1,0.25)
    Firebulk > Set rotate speed to random (-180,180) degrees per second
    Firebulk > Pin Pin to FireballHead (position & angle)
    Firetrail > Pin Pin to FireballHead (position only)
    Firetrail Sparls > Pin Pin to FireballHead (position only)

Add another Event

    System>Every tick

and the actions like this

    Firebulk> Set opacity to Firebulk.Opacity-1
    Firebulk>Set size to(Firebulk.Width 1,Firebulk.Height 1)

In the end you should have this

Hit play and enjoy

Problems

As we applied additive blend mode to each sprite and particles the effect will not work in pure white or very light areas. Test it yourself. Instead of black layout change to complete white. You will see or in this case not see the fireball at all. So keep in mind that this effect works best in dark areas.

Variations

Remember I told you that we have white textures so that we might alter the colors?

Go apply different colors to add some magical feeling to the fireball particle effect

Below some examples

Like & Share and also check out my store items :)

.PNG
.GIF

fireball-effect.gif

Download now 3.15 MB
.ZIP

fireball-particle-effect.zip

Download now 178.68 KB
.PNG
  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!