tilemap_get_global_mask

描述

This function can be used to retrieve the bit mask value for all tilemaps, returning the current mask value or -1 if there is an error or 0 if no mask is specified. For further information on global tilemap bit masks, see the function tilemap_set_global_mask.


语法:

tilemap_get_global_mask();


返回:

Real (0 for no mask, -1 for an error, mask value otherwise)


例如:

var mask = tilemap_get_global_mask(map_id);
var new_mask = tile_mirror | tile_flip | tile_rotate | 255;
if mask != new_mask
   {
   tilemap_set_global_mask(new_mask);
   }

The above code gets the global mask value associated with all tilemaps. If it is not the same as the value defined in the variable "new_mask", then it is set to that value.