Set Tile Opacity

Discussion and feedback on Construct 2

Post » Sat Nov 16, 2013 7:04 am

Hey there, quick request for the Tilemap object. Being able to set a tile's opacity would be awesome!
B
55
S
12
G
8
Posts: 339
Reputation: 9,364

Post » Sat Nov 16, 2013 8:19 am

At run time?

If its all one object then that may not be possible.
Image ImageImage
B
168
S
50
G
169
Posts: 8,281
Reputation: 108,191

Post » Sat Nov 16, 2013 8:28 am

Well considering you can set tiles at runtime, would it be that hard just to reset the tile with the same value and a different opacity?cow_trix2013-11-16 08:29:03
B
55
S
12
G
8
Posts: 339
Reputation: 9,364

Post » Sat Nov 16, 2013 8:42 am

I guess it depends on how the render is set up.
If its like a paste like the canvas object, then it might be possible.
Image ImageImage
B
168
S
50
G
169
Posts: 8,281
Reputation: 108,191

Post » Sat Nov 16, 2013 12:36 pm

Could you just have multiple tiles of the same image at different opacity?
B
147
S
74
G
20
Posts: 1,786
Reputation: 22,527

Post » Thu Nov 21, 2013 7:09 am

Hey @alspal, that's what I'm doing now, but it's not particularly flexible unfortunately.
B
55
S
12
G
8
Posts: 339
Reputation: 9,364

Post » Thu Nov 21, 2013 7:02 pm

I'm a bit wary of further requests like "how about making tiles rotate", "how about adding behaviors to tiles", etc. I think the Sprite object already does all of this pretty well. Is it manageable to just have a hole in your tilemap, stick in a sprite of that tile, then do funky things with that?
Scirra Founder
B
395
S
231
G
88
Posts: 24,367
Reputation: 193,684

Post » Sat Nov 23, 2013 2:16 am

I don't think tilemaps should be the end all for things as then the sprite object would not be used as much.

I think a better way to refer to the sprite object is calling it an entity.

Tilemaps are the environment, so you want to modify the environment. However in major games the base environment is static while the environmental objects that are not static are entities.


There is a couple ways to do what you want

1) Use a 2nd tilemap (you said it was inflexible)

2) Use tiles that are blank/bright colored and have the game on load check for those tiles in the tilemap, change the tiles, and spawn entities there.

This makes it so you automate the entity creation and can modify and re-parse the tilemap accordingly during runtime.

3) Manually place the entities.
B
21
S
8
G
6
Posts: 346
Reputation: 4,891


Return to Construct 2 General

Who is online

Users browsing this forum: Lorvin, Refeuh and 4 guests