How do I connect two object or back and unconnect

Get help using Construct 2

Post » Sun Aug 30, 2015 8:24 pm

Hi! How to make connections in this style: https://www.youtube.com/watch?v=Qg1GohzHK1A
and unconnect when you touch previous item? ;)
B
6
S
1
Posts: 25
Reputation: 525

Post » Sun Aug 30, 2015 8:38 pm

Message: aJamDonut can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Create a sprite that is just a horizontal line.

Spawn the line from the "source" object

Then set its width to the distance between both objects e.g. distance(source.x, source.y, dest.x, dest.y)

Then set its angle of source object towards the "dest" object

You can see a tutorial for a lazer with the affect here:

https://www.scirra.com
/tutorials/588/how-to-make-a-laser-for-tds

For "untouch" just destroy the line object.
Stuff I'm working on:



http://www.jamdonut.com
B
13
S
3
Posts: 88
Reputation: 1,000

Post » Sun Aug 30, 2015 8:40 pm

Ok, but how to delete only last line when i touch previous item?
B
6
S
1
Posts: 25
Reputation: 525

Post » Mon Aug 31, 2015 12:55 am

keep track of last line by a global variable UID
Stuff I'm working on:



http://www.jamdonut.com
B
13
S
3
Posts: 88
Reputation: 1,000


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests