I've been continuing work on the game I started for
7DRL 2025.
The latest thing I've been trying to implement is boxes, where boxes are sort of like mini-rooms with thin walls that can be removed. I'm trying to make the boxes definable in one object for ease of development. This means that the walls will have to pick up settings from the box object that they're attached to.
Because walls should stretch to fit around whatever size the box is, I thought I'd have their sprites use nine-slicing. However, the walls don't really stretch in the direction of their thicknesses, only along their lengths. So, I defined a nine-slice that doesn't have a middle. It's more like a six-slice.
When the walls were drawn, they were all four pixels wide instead of eight. After trying a bunch of things, I eventually figured out that GameMaker behaves weirdly with a weird nine-slice like that. So, instead, I used
draw_sprite_part_ext.
That was the way to go, but it still took several attempts because I didn't realize an object's `sprite_width` gets altered by `image_xscale`, which tripped up my scaling calculation.