1 Favourites

Subscribe

Get emailed when there are new posts!

Stats

  • 377 words
  • ~2-3 mins read time
  • Published
  • 178 visits
  • 9 visits per week
  • 202 page views

License

This blog post is licensed Creative Common Attribution Required v4.0.

Share

Enjoy this blog? Share with your contacts!

Share now

Report this blog post

In this example tutorial, il show two examples of how to pick the top instance of two sprites that are on top of each other, and create a fire-pit effect similar to the image bellow

by using the Blending Additive Effect.

PICK TOP INSTANCE OF TWO OVERLAPPING OBJECTS

--------------------------------------------

So for the first project this is very easy to do since we have a sprite object expression meant for this purpose.

So i created one sprite put in screen and duplicated it, then stack them on top of each other and colored them different.

I also added the Touch plugin so we can interact with the sprite.

Then to the event sheet

Event

Fire-Pitt Example

------------------

For the additive fire-pit effect, i made a sprite, with a greenish color, and rounded shaped as in the gif with the size of about 20x20 pixels, and duplicated it a few times. From the top to bottom z-indexed sprite that where stacked on top of each other i increased their size manually. so it would have something like top sprite size 20x20 2nd sprite 40x40 3rd sprite 60x60

Now on the sprite properties we want to go to blending options, and select additive.

I also added the sine behavior and set up the value of size to be altered every 0.5 sine time, with a 0.1 to 0.2 random period and a value of change in size between 2 and random 3 or 5.

For intensity purpose i also changed each sprite opacity so it come to closer to the gif.

Now while is not perfect, and can be done in various different ways, this example just shows how simple it is to create a environmental effect using basic behaviors and objects in Construct.

If you are confused on how this all was explained, you can download both files from the bellow links.

Hope it helped you and have a good day!

Download Pick Top Instance.

Download Fire-Pit Example.

If you don't have a C3 license don't worry is free and you can test the above files by clicking on this link right here C3-Editor

  • 1 Comments

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