Lightening spread effect?

Get help using Construct 2

Post » Thu Jun 25, 2015 7:34 am

I've figured out how to make a node locate the nearest specific sprite to itself and draw a line between the two, but now I can't figure out why the 2nd sprite won't spawn another spoke and follow the same process.. I created two lightening spokes, one for the main spoke and one for the second so it would only spread two spots.. but it's not working.

I've attached an image for the goal. Can anyone help?

Image

thank you!
B
4
Posts: 22
Reputation: 244

Post » Thu Jun 25, 2015 7:45 am

I might be stupid, but if the nearest sprite for sprite1 is sprite2, wouldn't the nearest sprite for sprite2 be sprite1?
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

Post » Thu Jun 25, 2015 8:20 am

LittleStain wrote:I might be stupid, but if the nearest sprite for sprite1 is sprite2, wouldn't the nearest sprite for sprite2 be sprite1?

In this picture it is, but not everytime.
1------2---3
Closest to 1 is 2, but closest to 2 is 3.

@Rollendice We also cant know why, if we dont see the code. Possible your sprite picking is wrong.
Sorry for my bad english, but I really do my best! And use and check with Google Translator.
B
10
S
4
G
1
Posts: 158
Reputation: 1,303

Post » Thu Jun 25, 2015 6:26 pm

deathangel1479 wrote:
LittleStain wrote:I might be stupid, but if the nearest sprite for sprite1 is sprite2, wouldn't the nearest sprite for sprite2 be sprite1?

In this picture it is, but not everytime.
1------2---3
Closest to 1 is 2, but closest to 2 is 3.

@Rollendice We also cant know why, if we dont see the code. Possible your sprite picking is wrong.


Thank you for clarifying that image.

I've attached an image of the code, I did some more work on it and now one of the nodes seems to work but only that one. If I interact with any other node, the main node just sends a spoke over to it rather than the nearest node sending one to it's nearest relative node.

it's confusing me haha.

Image
B
4
Posts: 22
Reputation: 244


Return to How do I....?

Who is online

Users browsing this forum: tdcostas and 6 guests