Additive lines

For questions about using Classic.

Post » Fri Mar 19, 2010 2:14 am



Hey. So I'm trying to get two shapes to interact as shown above, but dynamically. I basically want to show an area of effect around a unit, but when you build two units close enough that the AOE overlaps, they combine, they don't just overlay each other.

Anybody know how you could go about this?
B
55
S
12
G
8
Posts: 339
Reputation: 9,314

Post » Fri Mar 19, 2010 2:41 am

Here's a good way to do it, without shaders:
http://www.mediafire.com/?1d4y4nzymtw

And with shader:
http://www.mediafire.com/?izujmygkjzz

And if you need the middle to be transparent, you can use the Erase effect with it.
B
2
S
2
G
4
Posts: 156
Reputation: 1,762

Post » Fri Mar 19, 2010 7:05 pm

you need to place 4 copies of the objects silhouette behind both of them displaced 1 pixel in each of the 4 cardinal directions. at least thats what the outline shader does.

or you can of course just use the outline shader. if thats not a problem.
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Fri Mar 19, 2010 9:08 pm

Yeah, I threw the first one together, so naturally it's not accurate. :lol:

I was mostly just trying to show that it didn't need to be a solid color that way.
B
2
S
2
G
4
Posts: 156
Reputation: 1,762

Post » Sat Mar 20, 2010 12:21 am

Cool beans. Thanks guys, the outline method should work great :D
B
55
S
12
G
8
Posts: 339
Reputation: 9,314


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests