Rules for motion electricity

Sorry if i by chance put out the wrong topic, but i want to seriously ask one question,…we have discussed about various things from including pictures to getting to the scene but now the very main question and that is "how do i give a thing like electricity a rule to go any where where it found place…don’t understood?..ok here is an example…

ok now this is the picture of my drawing on paints (sorry if its not good) , now taking example of here i want to ask that for example the blue line is electricity and i want that whenever it gets a path it go inside it(but including itself from starting) by streching or whatever that the electricity should look like the thing in the picture…In that picture i already opened all the way and then i want the electricity to flow in the open path! 

IF you have any confusion then ask me again but i am fully confused …omg

i hope you reply fast

I believe I understand, sort of like a tunnel and the blue line can go in it while stretching at the same time. I am not sure how to do this, but you would have to keep track of the player’s movements…

Yup thsnk god you understood…but by streching i dont mean to strech pixels…but just like water i want it to go to the tunnels with being empty from the start…

Yes it will stretch to fill the player’s path in the tunnels. I saw a screenshot you posted of this.

[quote name=“sdktester15” post=“337697” timestamp=“1472677512”]

Yes it will stretch to fill the player’s path in the tunnels. I saw a screenshot you posted of this.[/quote
Oh but that’s not a screenshot it just a picture I made in paint to show you what I want to ask…well whatever but tell me the code anyways

First you might need code for a continuous action if the player was to drag the electricity:

https://coronalabs.com/blog/2014/02/04/tutorial-continuous-actions-in-corona/

Then you would need to record the player’s movements in order to display the electricity, I would recommend starting with dots instead of lines, just when you click on a circle it makes a dot, then you could move on to lines which is a bit more complex.

I believe I understand, sort of like a tunnel and the blue line can go in it while stretching at the same time. I am not sure how to do this, but you would have to keep track of the player’s movements…

Yup thsnk god you understood…but by streching i dont mean to strech pixels…but just like water i want it to go to the tunnels with being empty from the start…

Yes it will stretch to fill the player’s path in the tunnels. I saw a screenshot you posted of this.

[quote name=“sdktester15” post=“337697” timestamp=“1472677512”]

Yes it will stretch to fill the player’s path in the tunnels. I saw a screenshot you posted of this.[/quote
Oh but that’s not a screenshot it just a picture I made in paint to show you what I want to ask…well whatever but tell me the code anyways

First you might need code for a continuous action if the player was to drag the electricity:

https://coronalabs.com/blog/2014/02/04/tutorial-continuous-actions-in-corona/

Then you would need to record the player’s movements in order to display the electricity, I would recommend starting with dots instead of lines, just when you click on a circle it makes a dot, then you could move on to lines which is a bit more complex.