image_mask_set(3)

πŸ“¦
version 0.7.1 Β· 2 versions
, in nixos 26.05

🌸 NAME 🌸

okay so bestie, welcome to the image_mask_set(3) page β€” this is the Arcan Lua API, and we're about to make mask flags make sense. πŸ’…

image_mask_set β€” Set a status flag on the specified object. periodt.


✨ SYNOPSIS ✨

short and sweet, no cap:

nil
image_mask_set( vid, maskval )

πŸ’… DESCRIPTION πŸ’…

okay so here's the vibe: images that are linked to each other via link_image get a number of their attributes redefined to be relative to the parent they're linked to. iconic, honestly. πŸ¦‹

but sometimes not all attributes are relevant to inherit, and those can be controlled through the image_mask_ set of functions. yep, that's the whole point.

the currently valid maskvals are:

  • MASK_UNPICKABLE β€” if set, the image will be ignored for picking operations 🚫
  • MASK_LIVING β€” (default) if set, the image will be deleted when the parent expires πŸ’€
  • MASK_POSITION β€” (default) image coordinate system origo πŸ“
  • MASK_OPACITY β€” (default) image opacity πŸ«₯
  • MASK_ROTATION β€” (default) image rotation angle πŸ”„
  • MASK_SCALE β€” (default) reserved, no-op πŸŽ€
  • MASK_MAPPING β€” if set, the image will use the texture coordinate set of its (non-world) parent πŸ—ΊοΈ

πŸŽ€ NOTES πŸŽ€

  1. heads up, bestie: an invalid maskval is considered a terminal state transition. so yeah, not a silly little experiment, fr fr. πŸ’€

🧚 EXAMPLE 🧚

here's the example, verbatim β€” no cap:

function image_mask_set0()
      a = fill_surface(32, 32, 255, 0, 0);
      b = instance_image(a);
      show_image({a, b});
      move_image(a, 32, 32);
      rotate_image(a, 120);
      image_mask_clearall(b);
      image_mask_set(b, MASK_ORIENTATION);
end

πŸ’€ MISUSE πŸ’€

and here's the MISUSE example, also verbatim β€” please don't:

function image_mask_set0()
      image_mask_set(WORLDID, math.random(1000));
end
yeah, this is literally listed under MISUSE. consider yourself warned, bestie. 🫢

πŸ”₯ SEE ALSO πŸ”₯

go give these pages some love too:

image_mask_toggle(3) image_mask_clear(3) image_mask_clearall(3)


xoxo, the image manual Β· October 2026 Β· image_mask_set(3) πŸ’–πŸ«Άβœ¨

πŸ“¦ where this page comes from