problem with mining

Get help using Construct 3!

Post » Mon Jul 10, 2017 7:43 am

when i start my laser
it reduce the hp of all asteroids it hit how can i fix it
i just want the one that is on the tip on the laser not all the stack pile of them XD
B
27
S
9
G
3
Posts: 136
Reputation: 3,750

Post » Mon Jul 10, 2017 7:46 am

You have to pick the one effected by the laser in the conditions or you'll effect all of the asteroids.

For example

Image

This only subtracts HP on the asteroid that is overlapping the laserbeam.

And this only reduces HP on the asteroid that is overlapping laser and the mouse cursor is over.

Image

(Remember that the events above is reducing the HP with 1 per tick so if your game runs at 60fps it is -60HP/sec. If you add every 1sec or something like that in the conditions it will only drain 1hp/sec)


But you can do all kinds of picking so it only picks the object you want. This is just some simple examples.
B
54
S
23
G
12
Posts: 746
Reputation: 11,908

Post » Mon Jul 10, 2017 4:34 pm

the problem is sometime there is 4 of them stacked together
B
27
S
9
G
3
Posts: 136
Reputation: 3,750

Post » Mon Jul 10, 2017 4:45 pm

Image

You can pick the top asteroid by doing this or simply just pick a random one. As long as it only picks one asteroid at a time.
B
54
S
23
G
12
Posts: 746
Reputation: 11,908

Post » Mon Jul 10, 2017 5:16 pm

i dont see the pick top instance
B
27
S
9
G
3
Posts: 136
Reputation: 3,750

Post » Mon Jul 10, 2017 5:23 pm

It should be at the bottom of the objects conditions. Make sure that you are on condition events and not actions.

This particular pick is on the object itself and not system-->pick
B
54
S
23
G
12
Posts: 746
Reputation: 11,908

Post » Mon Jul 10, 2017 5:35 pm

Anonnymitet wrote:It should be at the bottom of the objects conditions. Make sure that you are on condition events and not actions.

This particular pick is on the object itself and not system-->pick

ok tryed it but did not work at all still all asteroid are being mined
B
27
S
9
G
3
Posts: 136
Reputation: 3,750

Post » Mon Jul 10, 2017 5:40 pm

Nvm got it to work
+ Asteroid: Is overlapping BulletLaser


----+ Asteroid: Pick top instance
-----> Asteroid: Subtract random(​1​,​10​) from Hp
B
27
S
9
G
3
Posts: 136
Reputation: 3,750

Post » Mon Jul 10, 2017 5:57 pm

Yes, exactly as I explained :)
B
54
S
23
G
12
Posts: 746
Reputation: 11,908

Post » Tue Jul 11, 2017 5:51 am

yeah well i was slow to get it :P
B
27
S
9
G
3
Posts: 136
Reputation: 3,750


Return to How do I...?

Who is online

Users browsing this forum: No registered users and 1 guest