Generating a world from a bitmap?

Get help using Construct 2

Post » Fri May 10, 2013 5:37 pm

@Yttermayn

This reads the colour data from the canvas into the array

Canvas2.rgbaAt(loopindex("xloop"), loopindex("yloop"))


In each map group this is simply comparing the data at any given location in the array with a set colour.

"rgba(0,255,0,1)"

Green in this case.

Hope that helps
B
44
S
15
G
9
Posts: 1,096
Reputation: 11,013

Post » Sat May 11, 2013 12:45 am

Yes, that makes more sense now, thank you very much! Hopefully I can get something rudimentary working this weekend.
B
11
S
4
G
1
Posts: 159
Reputation: 1,803

Post » Mon May 13, 2013 2:51 pm

@spongehammer

"rgba(00,255,0,1) = Array.At(loopindex("xloop"),loopindex("yloop"))"

It looks like you are trying to compare/match colors on the array you added to the layout (which is blank?), rather than reading image data from the canvas. I'm still getting hung up on this...

Thanks for your patience.
B
11
S
4
G
1
Posts: 159
Reputation: 1,803

Post » Mon May 13, 2013 3:14 pm

I don't see the "Canvas2" object referenced anywhere...
B
11
S
4
G
1
Posts: 159
Reputation: 1,803

Post » Mon May 13, 2013 5:57 pm

@Yttermayn





B
44
S
15
G
9
Posts: 1,096
Reputation: 11,013

Post » Mon May 13, 2013 7:18 pm

@spongehammer Ah hah! Thanks! Missed that little plus sign to expand the group.
B
11
S
4
G
1
Posts: 159
Reputation: 1,803

Previous

Return to How do I....?

Who is online

Users browsing this forum: Radulepy and 5 guests