sprite_set_cache_size_ext

Sets the size of the cache for a given sub-image of a sprite.

Syntax:

sprite_set_cache_size_ext(ind, index, max);


Argument Description
ind The index of the sprite to change the cache size of.
index The subimage of ind to change the cache size of.
max The maximum number of cached copies of the sprite that can be stored.


Returns: N/A


Description

When performing image blending, HTML5 cannot do it dynamically in the same way an executable could be performed. Therefore GameMaker: Studio has to temporarily save a blended copy of the image and load it in. This function sets how many blended copies of the given sprite can be cached before old ones are overwritten. Default is 4. This is applied to one single given subimage of the sprite.


Example:

sprite_set_cache_size_ext(sprite0, 0, 2);

This will set the sprite cache of the first subimage of sprite0 to 2 copies.


Back: Sprites
Next: sprite_save
© Copyright YoYo Games Ltd. 2018 All Rights Reserved