• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - Code Setting a tile's alpha in code

F

Flip

Guest
Is this possible? The only thing I can see is a reference to a compatibility function "layer_tile_alpha(tile_element_id,alpha)" which should not be used outside of compatibility scripts?

How can I adjust the opacity of a tile in code?
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
You can't currently unless you use your own shader to do it. I'm pretty sure this is a coming feature though...
 
F

Flip

Guest
Sounds complicated.. yes I read it was a coming feature but that was posted a year ago. Was hoping they got around to it and I've overlooked it. Not sure how this hasn't made it in yet seems important!
 
S

SRJProd

Guest
It does seem like a useful feature, I'd never really thought about it. Might look into it, see if I can think of a temporary/simple solution.
 
F

Flip

Guest
Useful is right. All games I've theorized could use it, and benefit from the performance of not having to entirely switch through and between tiles or as nocturne said create a custom shader.
 

bbbower

Member
Yeah, been beating my head in trying to figure out why this wasn't working, turns out its not only removed but also a unicorn now. Writing a shader would work for some instances, but in particular, I was using the alpha of the tile prior to a shader to send data to the shader to move its position so it kind of kills the whole purpose and I now need to add every tile into a seperate asset and drop it in the level or rewrite the entire draw pipeline and manually read from my own tile mapping file and blah yeah ... i just gave up
 
Top