color based blocker

Get help using Construct 2

Post » Sun Feb 03, 2013 5:40 pm

Dear Ashley, I need some help on creating solid type blocker using differentiation in color... Am using two colors in my game background(consider blue and red), if player moves on blue they can move without any problem if they come into red color, they should be blocked. Please help me howto achieve this. Thank you in advance.javaaddict2013-02-03 17:41:44
B
4
Posts: 10
Reputation: 495

Post » Sun Feb 03, 2013 5:59 pm

Why should you call the admin ( *whispers* He's Fixing Bugs ) to help you when we are here ?
Give the Red side a Solid behavior that would make the red part act like a wall ...
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Sun Feb 03, 2013 6:06 pm

Thanks Whiteclaws, Actually background is a single image, from that we have to differentiate both colors.
B
4
Posts: 10
Reputation: 495

Post » Sun Feb 03, 2013 6:08 pm

Thanks Whiteclaws, Actually background is a single image, from that we have to differentiate colors .
B
4
Posts: 10
Reputation: 495

Post » Sun Feb 03, 2013 8:09 pm

Construct 2 does not have per pixel collision detection as would be needed for this. If you build the image with smaller pieces like rotated/re-sized rectangles then that's one option.

That being said if you really need per pixel collision detection you can get something working with the canvas plugin with the rgbaAt() expression.

Here is a simple example:
http://dl.dropbox.com/u/5426011/examples16/perpixel.capx
B
79
S
24
G
54
Posts: 4,753
Reputation: 40,769

Post » Mon Feb 04, 2013 7:34 am

Thank you ROJO ... I will try and inform shortly .. Once again very thank you guys ..
B
4
Posts: 10
Reputation: 495


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 27 guests