How to connect multiple instances through the lines?

For questions about using Classic.

Post » Sun Aug 23, 2009 8:15 pm

Question is - when I create new sprite instance in the game how to make it connects to all other instances through the lines (like in the game World of Goo)?
B
3
S
2
G
3
Posts: 146
Reputation: 1,567

Post » Mon Aug 24, 2009 12:52 am

[quote="Mary Jane":3n4km3jp]Question is - when I create new sprite instance in the game how to make it connects to all other instances through the lines (like in the game World of Goo)?[/quote:3n4km3jp]
oh
it depends whether u can move new sprites.
but teh way to do this I can think of would be.
spawning new sprite, setting its height to distance between two sprites, then rotate/moving it so its in correct position.

or u can use canvas, but I never used canvas so I dunno how.
there is also line object, u could use that as well. this is probably best option. I didn't know it was there till now.

I'd need a bit more info to give u any advice on how to connect the instances, it realy depends on your game mechanics.
to make something like world of goo, you probably could do something like, Pick all instances within X radius and connect new sprite to each.
B
24
S
7
G
3
Posts: 138
Reputation: 2,795

Post » Fri Aug 28, 2009 10:37 pm

I did this for the screen-space trails example.

Used a "bridge" sprite with hotspot at one edge, positioned said "bridge" sprite on one of the "objects" to join, then set the bridge's angle towards the other object and stretched it according to the distance between them.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests