How do I create a nice effect after destroying blocks?

Get help using Construct 2

Post » Wed Nov 19, 2014 12:40 pm

Like in Mario?

So there is a hero,
he destroys the brick above him,
and i.e. 4 elements of the brick are flying for 1-2 sec and then dissapears

I don't want to use physics
B
18
S
6
G
1
Posts: 783
Reputation: 4,187

Post » Wed Nov 19, 2014 12:47 pm

Hey szymek! Have you looked at this tutorial? Could you get the effect you're after by leaving out the physics parts?
Image
B
9
S
3
G
1
Posts: 346
Reputation: 1,560

Post » Wed Nov 19, 2014 12:50 pm

@hundredfold

it's about explosion,
I want some 3-4 elements flying for 1-2 sec,
and then disapperaing ;)
B
18
S
6
G
1
Posts: 783
Reputation: 4,187

Post » Wed Nov 19, 2014 1:05 pm

When you shot the little runners, you get an effect - http://zombiedongs.com/helo/

I used particles for this.
B
11
S
2
Posts: 46
Reputation: 739

Post » Wed Nov 19, 2014 6:01 pm

szymek wrote:Like in Mario?

So there is a hero,
he destroys the brick above him,
and i.e. 4 elements of the brick are flying for 1-2 sec and then dissapears

I don't want to use physics


This is how an amateur did it using an animation sprite. It may not be the correct way, but it works for me.
1) Open the image in an image editor
2) Use the 'selection tool' to create copies of small pieces of the box--> paste them to a new blank canvas 2-3 times larger than the original.
3)For each frame ( i only use 3) paste the pieces farther outward/downward/upward as you like.
4) In C2 create a new sprite object--> import the 1st frame --> in the animation frames right click --> import frames from ( i use single files for this so i can go back and easily edit the frames if i need to)
Make the speed of the 1st frame to your liking. I use 5-7, leave the others at 1.

This is an example i pasted together of the animation for a block that must be jumped on to break.

Image

The block uses a instance variable for health event, but you may not need that.

Image
B
38
S
18
G
19
Posts: 664
Reputation: 14,107

Post » Wed Nov 19, 2014 6:08 pm

Particles --> make one broken block - then set change the following parameters:
Rate: 4
Spray Cone: 360 degrees
Type: One Shot
Time out: 2 seconds

Then, On Collision,
Particles.Position (Block.X, Block.Y)
Particles --> Set Spraying

You're done :)
B
10
S
2
Posts: 107
Reputation: 978

Post » Wed Nov 19, 2014 7:17 pm

Hasan999 wrote:Particles --> make one broken block - then set change the following parameters:
Rate: 4
Spray Cone: 360 degrees
Type: One Shot
Time out: 2 seconds

Then, On Collision,
Particles.Position (Block.X, Block.Y)
Particles --> Set Spraying

You're done :)


use that + set random x and y to the size of your block.
My game Petrolhead Tactics is now on Steam Greenlight. I could not have done this without C2 ? Please rate, if you like!

Steam client already open: petrolheadtactics.com/steam
Web: petrolheadtactics.com/greenlight
B
20
S
4
G
4
Posts: 132
Reputation: 4,130

Post » Wed Nov 19, 2014 10:35 pm

Thank you guys :)
B
18
S
6
G
1
Posts: 783
Reputation: 4,187


Return to How do I....?

Who is online

Users browsing this forum: luck1210, R0J0hound and 1 guest