image_mask_toggle(3)

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

✨ NAME ✨

image_mask_toggle β€” Invert a status flag on the specified object πŸ’…

Okay so welcome to the Arcan Lua API page for image_mask_toggle(3), bestie. The way this function just inverts a status flag on the specified object is lowkey iconic. 🫢


🫢 SYNOPSIS 🫢

The synopsis is literally this, no cap:

nil
image_mask_toggle( vid, maskval )

πŸ“ NOTES πŸ“

Okay so there's one note and it's giving β€œpay attention” energy:

  1. an invalid maskval is considered a terminal state transition. πŸ’€βœ¨

Like, that's a terminal state transition, bestie. Not a cute little oopsie. Handle with care. πŸŽ€


🌸 EXAMPLE 🌸

Here's the example, copied exactly because we do not mess with code in this house:

function image_mask_toggle0()
      a = fill_surface(32, 32, 255, 0, 0);
      for i=1,4 do
            if (image_hit(a, 0, 0)) then
                  print("pickable");
            else
                  print("unpickable");
            end
            image_mask_toggle(a, MASK_UNPICKABLE);
      end
end

πŸ’€ MISUSE πŸ’€

And here's the misuse section β€” this is the part where you go β€œbestie no” 😭:

function image_mask_toggle0()
      image_mask_set(WORLDID, math.random(1000));
end

It's in the MISUSE section for a reason, okay? πŸ™ˆ


πŸ‘€ SEE ALSO πŸ‘€


Later bestie β€” this page came from the image manual, dated October 2026, for image_mask_toggle(3). πŸ’–βœ¨πŸ«Ά

πŸ“¦ where this page comes from