ent_alphaset (var Frame, var
Percent);
Generates an alpha transparency map for the MY
sprite entity by multiplying the brightness of the sprite bitmap by a percent
factor (-100..100). Negative percent factors produce an inverse alpha map. The
alpha map can be calculated individually for each sprite frame, and gives better
control than the FLARE flag. If the frame parameter
is 0, the alpha map is calculated for all frames of the sprite. Useful percent
values are in the range of 5..30.Ent_alphaset can only be executed
once per entity, further ent_alphaset instructions are
ignored until the entity is purged. Entities with the same file must have the
same alpha map. Alpha maps are only effective in 16- or 32 bit modes. In a multiplayer
system this instruction is only effective on the client side.
Parameters:
| frame |
Frame number that should be used for the alpha channel. At 0 alpha channels for all frames will be built. |
| percent |
Factor of the alpha-map in percent (-100..100). Negative values inverts the alpha-map |
Modifies:
my - The sprite entity that contains an alpha-map.
Speed:
MediumEdition:
E
Example:
ent_alphaset(0,-15); // creates a transparency map for thick black smoke
ent_alphaset(0,5); // creates a transparency map for thin white smoke
See also:
flare, alpha, transparent, bright