How do I draw a line between two image points. "lightning"

Get help using Construct 2

Post » Sat Sep 13, 2014 5:55 am

I saw a thread a while back and I got to thinking that being able to draw a line or link sprites together to connect points should be easy.. Just not easy enough for me to figure out. Does anyone know how to do this?

I've included a link to a creative guide, I just don't know how to translate it to C2.

http://drilian.com/2009/02/25/lightning-bolts/
B
12
S
4
G
2
Posts: 132
Reputation: 1,749

Post » Mon Sep 15, 2014 8:47 am

If you are after a Straight line......Create a 1 or 2 pixel square Sprite object or better yet a tiled Background object

Set its x, y position to the first object...Then set the objects width to the distance between the 2 objects and the angle to the other objects x,y position(use image points x,y for accuracy)

Below I have included a simple demo of how to do it one way..there are most likely plenty of other ways..


Just Drag either object to see the line appear

A line between 2 objects
https://www.dropbox.com/sh/2lmy1a0t8galurf/AAAm6isv0mjZqRMOY_FA4Zh7a?dl=0
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
35
S
13
G
8
Posts: 318
Reputation: 7,685

Post » Sun Oct 11, 2015 1:26 pm

@mystazsea

Can you upload the capx again cause I need to refer it in my project. Very much appreciated. Thanks.
B
23
S
10
G
2
Posts: 104
Reputation: 3,071

Post » Sun Oct 11, 2015 2:03 pm

@mrneko

mystazsea hasn't been on this forum for over 6 months and hasn't posted for over 10 months, so you're request may go unaswered.

Hopefully, someone else may still have the file, but it was over a year ago.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
86
Posts: 5,414
Reputation: 59,512

Post » Sun Oct 11, 2015 10:47 pm

@zenox98

Thanks. Didn't know that haha. I found a similar tutorial somewhere else so all good.
B
23
S
10
G
2
Posts: 104
Reputation: 3,071

Post » Mon Oct 12, 2015 6:19 am

im still here zenox98 but i dont have that file anymore

here is a new one i just whipped up for you which is more or less identical to the last one

Line between two objects

https://www.dropbox.com/s/poiwv6rpezja462/Line%20between%202%20objects.capx?dl=0
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
35
S
13
G
8
Posts: 318
Reputation: 7,685


Return to How do I....?

Who is online

Users browsing this forum: MassimoF and 28 guests