How do I Destroy Recent Bullet

Get help using Construct 2

Post » Mon Jan 11, 2016 1:51 am

I have a fireball set to be destroyed upon colliding with the Tilemap.

Unfortunately, if there's more than one fireball on the screen, it'll destroy every single one of them.

How do I fix this? I can't pick by UID because they're spawned when the player presses a button, so that's impossible as far as I know.
B
23
S
10
G
1
Posts: 153
Reputation: 2,635

Post » Mon Jan 11, 2016 5:23 am

You must condition out all the others.. read the manual under "picking" instances of an object.
You will need to find a condition that is only true for the one(s) you want destroyed so only it/they meet the condition and are destroyed.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
51
S
14
G
8
Posts: 592
Reputation: 8,556

Post » Mon Jan 11, 2016 6:05 am

Any ideas on what the condition could possibly be?

The player shoots fireballs by pressing a button, so they're all the same, like I said. ^-^
B
23
S
10
G
1
Posts: 153
Reputation: 2,635

Post » Mon Jan 11, 2016 6:18 am

I fixed it by choosing "Pick Furthest to Player.X & Player.Y"

Taken care of.
B
23
S
10
G
1
Posts: 153
Reputation: 2,635

Post » Mon Jan 11, 2016 6:30 am

Nevermind, doesn't work. My bad : P
B
23
S
10
G
1
Posts: 153
Reputation: 2,635

Post » Mon Jan 11, 2016 9:46 am

On Fireball Collison with Tilemap -> Destroy Fireball


Doesn't this work?
B
11
S
3
G
1
Posts: 32
Reputation: 751

Post » Mon Jan 11, 2016 10:45 am

ChaoticShadow24 wrote:Nevermind, doesn't work. My bad : P


Do not use the Pick furthest condition in this situation for it is not a certain that it will be destroyed in the right place and in the right time.
Use the on collision condition and destroy it..

On collision of object Bullet to Tilemap1 then
----> Destroy Bullet

:This will ensure success in timing and location:
Image



The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
51
S
17
G
90
Posts: 1,108
Reputation: 59,024

Post » Mon Jan 11, 2016 11:35 am

That's exactly how it is, except in my case, I have the bullet to fade out upon colliding with the tilemap, which causes all fireballs on the screen to fade out. Any ideas?

(it gets destroyed after fade-out in the behavior settings)
B
23
S
10
G
1
Posts: 153
Reputation: 2,635

Post » Mon Jan 11, 2016 5:03 pm

ChaoticShadow24 wrote:That's exactly how it is, except in my case, I have the bullet to fade out upon colliding with the tilemap, which causes all fireballs on the screen to fade out. Any ideas?

(it gets destroyed after fade-out in the behavior settings)


I really don't know what you mean by that, usually collisions do the trick. Can you provide more details or better yet a sample of .capx file.
Image



The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
51
S
17
G
90
Posts: 1,108
Reputation: 59,024

Post » Mon Jan 11, 2016 5:47 pm

ChaoticShadow24 wrote:That's exactly how it is, except in my case, I have the bullet to fade out upon colliding with the tilemap, which causes all fireballs on the screen to fade out. Any ideas?

(it gets destroyed after fade-out in the behavior settings)


There seems to be something wrong with the picking..

I'm guessing you are setting a variable on collision and checking this with a system compare action, which would be the issue..

Please share your events and/or capx so this very simple issue can be solved..

(by the way, ofcourse you can use uid with created objects)
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Next

Return to How do I....?

Who is online

Users browsing this forum: BloodFoxStudios, Fenix18, oosyrag, waguilar and 10 guests