ID:165370
 
        var
turf/pxlboard/pxlboard = locate(ceil(x, 4) / 4, ceil(y, 4) / 4, z)
icon/pxl = icon('pixel board.dmi', state)
pxl.Shift(1, ((x - 1) * 8))
pxl.Shift(2, ((y - 1) * 8))
pxlboard.icon = pxl.Blend(pxlboard.icon)


Am I in some way not using the Blend proc correctly or something? I've checked the pxl icon and it's as it should be, and so is pxlboards, yet when I blend them there, the whole thing turns black!

What's going on with it?
Just to be sure of something, do you have world.turf set anywhere? It could be a problem elsewhere, where you are maybe relocating or deleting the turf, and as a result, the location turns to a default world.turf of /turf.

[Edit]
Also, by any chance, does pxlboard even have an icon?
In response to CaptFalcon33035
Nope, it's not set. I set it just to see what would happen, though, same effect.

Maybe if I used /obj instead?
In response to CaptFalcon33035
Of course. =/
In response to Koil
Is variable state a valid icon_state? Have you tried using pxlboard.icon = pxlboard.icon.Blend(pxl)? Note, to do that, you probably need to do something like:

var/icon/pxlbicon = icon(pxlboard.icon,pxlboard.icon_state)


And instead of pxlboard.icon = pxlboard.icon.Blend(pxl), use pxlboard.icon = pxlbicon.Blend(pxl). I dunno, I usually try differing variations of a bunch of things if I can't figure out the problem.
In response to CaptFalcon33035
Okay fixed it.
In response to Koil
Well, what was the problem?
In response to CaptFalcon33035
I wasn't shifting in the right direction, I was using the wrong blending operation, and other various things that I've already forgotten due to severe lack of sleep.
In response to Koil
It immediately looked to me like this was the culprit:
 pxlboard.icon = pxl.Blend(pxlboard.icon)


I don't think you can do that - AFAIK, icon.Blend() doesn't return a value (returns null) - it only changes the icon it's used on. Therefore, you needed to do this instead:
pxl.Blend(pxlboard.icon)
pxlboard.icon = pxl
In response to Kaioken
Yeah. I realized that shortly after I posted my last message here.