GM: image alpha
From GMpedia.org Wiki
- The correct title of this article is image_alpha. It appears incorrectly here because of technical restrictions.
| Type: | variable |
| Globalism: | Local |
| Editable: | Yes |
The image_alpha local variable is the variable that defines the alpha blending degree of the whole image, making it more or less transparent.
For a fully opaque sprite to be drawn:
image_alpha=1
And for a fully transparent sprite to be drawn (aka invisible):
image_alpha=0
And everything in between makes the object partially transparent to a certain degree (according to the number).
In the image on the right side, there are two objects, one with a blue and red circles as one sprite, with a .5 image_alpha, and another seperate one with a lower depth but also a .5 image_alpha.
For the result to appear, no actions must be in the drawing event, or the draw_sprite_ext is used with sprite_index, image_index, image_alpha, and other GM variables corresponding to the object's sprite's state.


