How do I

Just started using Construct 2? Post your questions here

Post » Wed Apr 27, 2016 11:44 am

Hello everyone

I'm sorry for my English.

I'm doing a flamethrower with particles for the fire. But wanting to make the fire burn ( destroy ) the enemies I can not do it.

In the tutorial Ghost Shooter, the bullet had this event:

Bullet -> On collision with another object -> pick Monster .
Acción: Monster -> Destroy
Acción: Bullet -> Spawn another object -> Explosión , layer 1
Acción: Bullet -> Destroy

But the particles seem to have On collision with another object...

Do not you can make fire with particles ?
Is there any way to do this ?

Thank you
B
3
Posts: 5
Reputation: 185

Post » Wed Apr 27, 2016 2:13 pm

As far as I know you can not use particles for collision. It's only a graphical effect.
You can try to mix sprites in the particles. You have to look how many, so that the sprites will really hit what you want.
I made a litte time ago something similar, maybe is useful for you:
https://drive.google.com/file/d/0B5FlDY ... sp=sharing

Click on any of the blue boxes and it will explode and if the 'particles' hit a other box it will explode too. Double click anywhere will restart the layout.
I mixed 15 sprites in 100 particles in every explosion. You will see that sometimes it is not enough and a box will not explode, but to many sprites will affect the CPU Usage.
B
24
S
3
G
1
Posts: 454
Reputation: 2,171

Post » Wed Apr 27, 2016 4:59 pm

Easy.... FAKE IT!
Have your flame thrower throwing particles like normal.
When flame thrower is active have it "shoot" invisible sprite bullet (a sprite set to invisible) that DO have collision and are destroyed after the correct range of your "flame".

Now it looks like your flamethrower is dealing damage when its really invisible "bullets".

Set the damage value to low on the bullets and their spawn rate to high and you get a very satisfying constant damage effect on target consistent with other flamethrower effects in games.

P.S. Invisible sprite bullets are also good for directional magical spell attacks too... :)
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
70
S
19
G
8
Posts: 639
Reputation: 9,674

Post » Thu Apr 28, 2016 7:26 am

Thank you

It's what I had in mind but did not know if that solution would be poor .

Thanks again and I get to it !!

EDIT:

Works!!! Thank you!!!
B
3
Posts: 5
Reputation: 185

Post » Thu Apr 28, 2016 3:51 pm

Its only poor if it uses up too many resources or somehow gets in the way of other features or further development! :)
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
70
S
19
G
8
Posts: 639
Reputation: 9,674

Post » Wed Jun 08, 2016 9:56 am

chrisinfinger wrote:Its only poor if it uses up too many resources or somehow gets in the way of other features or further development! :)


Ok!!


I have an other question.
By making the Sprites invisible to simulate fire damage is leaving many Sprites followed .
I want you to shoot out three no more and after a while again leaving another 3 , but I can not do it.

Or the Sprites instead of leaving in a long line are spaced :

....................... -----> so leave sprites


I want them so (guines are to simulate the spacing)

. --------- . ------------- .

or

... ------------- ... ------------- ...



not if I explain :lol:


EDIT:


By the way, I want to create small fires by fire, would it be better flames created with particles or fire animated sprites ? The fire would not be eternal , it turns off after a few seconds.
B
3
Posts: 5
Reputation: 185

Post » Wed Jun 08, 2016 10:18 pm

Let me make sure I understand... your wanting the invisible damage sprites to spawn 3 in a row and then be destroyed followed by a delay and then repeat?

ie. damageSprite, damageSprite, damageSprite (destroy,destroy,destroy) (delay) damageSprite, damageSprite, damageSprite (destroy,destroy,destroy) ?

As far as sprite fire or particle fire it really depends on the look of your game.. particle fire would be easier once you got the right particle look since you don't have to animate it... but particles can begin to add up if you use many in your game at once.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
70
S
19
G
8
Posts: 639
Reputation: 9,674

Post » Thu Jun 09, 2016 11:08 am

chrisinfinger wrote:Let me make sure I understand... your wanting the invisible damage sprites to spawn 3 in a row and then be destroyed followed by a delay and then repeat?

ie. damageSprite, damageSprite, damageSprite (destroy,destroy,destroy) (delay) damageSprite, damageSprite, damageSprite (destroy,destroy,destroy) ?

As far as sprite fire or particle fire it really depends on the look of your game.. particle fire would be easier once you got the right particle look since you don't have to animate it... but particles can begin to add up if you use many in your game at once.



yes.


Now they go like this:

.............................


I do not want that.

I want just what you say.


Press left button and Hold down:
spritedamage, spritedamage,spritedamage (destroy,destroy,destroy) delay spritedamage, spritedamage,spritedamage (destroy,destroy,destroy)


I lack the delay
The destroy I have it so:

spritedamge (bullet)-----Bullet distance travelled 200 pixels-------spritedamage destroy


I read some post , but has not left me.

I have tried with Wait x second, but no work

Sorry my English
B
3
Posts: 5
Reputation: 185

Post » Thu Jun 09, 2016 4:44 pm

Try this:

https://drive.google.com/open?id=0Bx-ufu2WID53S2pfejgwYnNQY3M (click the download arrow in the upper right corner of the screen)

My example uses spacebar to fire, I didn't add the destroy, and the damage sprites are visible so you can see their spacing... otherwise the art work is spectacular...
Last edited by chrisinfinger on Mon Sep 05, 2016 10:25 pm, edited 1 time in total.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
70
S
19
G
8
Posts: 639
Reputation: 9,674

Post » Fri Jun 10, 2016 9:47 am

Message: KoX can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
chrisinfinger wrote:Try this:

https://dl.dropboxusercontent.com/u/2346355/construct2/Helping/FlameThrowerDamageTimed.capx

My example uses spacebar to fire, I didn't add the destroy, and the damage sprites are visible so you can see their spacing... otherwise the art work is spectacular...


Thank you!!!!!!
B
3
Posts: 5
Reputation: 185


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 3 guests