adding rgb for coloured lasers

Get help using Construct 2

Post » Tue Dec 18, 2012 3:47 pm

here's a test file with some coloured beams & a target sprite which changes colour based on adding beam rgb...

https://dl.dropbox.com/u/52354372/rgb_beams_test_1.capx

works nicely, but since i'm new to construct i thought i'd post this & ask if there's a simpler method that i'm missing.

mattb2012-12-18 15:48:06
B
27
S
12
G
1
Posts: 157
Reputation: 3,359

Post » Tue Dec 18, 2012 5:37 pm

You could take a look at the canvas plugin. I know you can access the colour of the canvas in rgba format and also set the colour in the same way.
B
44
S
15
G
9
Posts: 1,096
Reputation: 11,013

Post » Tue Dec 18, 2012 6:16 pm

Take a look at the "ReplaceColor" effect.
B
45
S
16
G
18
Posts: 845
Reputation: 13,673

Post » Thu Dec 20, 2012 9:10 pm

Thanks for the ideas, i'll check them out.

So, another question about something that I've got half-working...



https://dl.dropbox.com/u/52354372/rgb_beams_test.capx

Any idea where I'm going wrong?



B
27
S
12
G
1
Posts: 157
Reputation: 3,359

Post » Sat Dec 22, 2012 1:41 pm

weird indeed
B
93
S
19
G
34
Posts: 1,840
Reputation: 27,963

Post » Sat Dec 22, 2012 4:42 pm

The problem is the Pick nearest. I've added some debugging to your CAPX: http://www.bht.hostingsiteforfree.com/bugs/rgb_beams_test_DEBUG.capx

You are picking at the beginning of the line, not at the intersect point, so the "nearest" on your second node is actually the first node.

I don't have a solution for you, but this should help.

Edit: off the top of my head, I think you are picking backwards. Check each Node, and then figure out which beams overlap.blackhornet2012-12-22 17:00:07
ImageImageImage
B
67
S
19
G
121
Posts: 3,196
Reputation: 72,879

Post » Sun Dec 23, 2012 6:06 pm

Yep it was a picking problem. Fixed it (learning a lot in the process) & thought i'd post the results so other Construct2 newcomers can have a look:

https://dl.dropbox.com/u/52354372/rgb_beams_final_v2.capx

B
27
S
12
G
1
Posts: 157
Reputation: 3,359

Post » Mon Dec 24, 2012 11:27 am

somewhere in the forum someone add capx with laser reflect on mirror that might be useful to gamedelgado2012-12-24 11:43:01
B
93
S
19
G
34
Posts: 1,840
Reputation: 27,963


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 19 guests