order_image(3)
π order_image π
okay bestie, welcome to the Arcan Lua API manual page for order_image(3) β yes, the one that changes up when your image gets drawn. let's get into it, no cap.
πΈ NAME πΈ
order_image β alter the drawing order of the specified image. it's giving "move over, i'm the main character now" energy. π
β¨ SYNOPSIS β¨
nil
order_image( vid or tblvid, newzv )
so yeah, it returns nil, and you feed it either a vid or a tblvid, plus your newzv. simple, iconic. π«
π¦ DESCRIPTION π¦
okay so literally every object has an order property, and that property decides when it should be drawn in respect to other ones. think of it as the object's place in the drawing line. π
you can change that value by calling the order_image function on a video object, or on a table of video objects. group makeover, we love to see it. π
the newzv should be within the range 0 <= n < 65535 and will be clamped β so if you try to push it outside, it gets pulled back into line. the exception to this is objects that are linked to others and have their order being relative to its parent. for those, negative values are permitted, but they will be resolved to a value within the specified range. so yes, negatives can happen, but they still get resolved into that range. periodt. π₯
π NOTES π
- this only applies to the active owner of an image. for images attached to multiple
rendertarget, such changes won't take place until you forcibly attach/detach for each specifiedrendertarget. so don't expect it to just magically update everywhere, bestie. π - order can also be relative to the world-order of the resolved parent, see
image_inherit_order. iykyk. π
π§ EXAMPLE π§
function order_image0()
a = color_surface(32, 32, 255, 0, 0);
b = color_surface(32, 32, 0, 255, 0);
move_image(b, 16, 16);
show_image({a, b});
order_image(a, 2);
end
look at a getting its order set to 2 β little main character move. slay. π
π MISUSE π
function order_image0()
a = color_surface(32, 32, 255, 0, 0);
order_image(a, -1);
end
this is the MISUSE example, bestie. it is right there in the name. do not treat it like a cute little hack without knowing what you're doing. π
β SEE ALSO β
that's the whole vibe π this page comes from the image source/version and is dated October 2026, so you know it's official. stay slay, bestie β and may your draw order always be correct. π«Άβ¨
π¦ where this page comes from
- nixos 26.05: arcan 0.7.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms