Is it possible to change / set layers in the GuiDrawingPanel aswell as the RGB/alpha value? I'm messing around with something on Delteria which does display the tiles inside the DrawingPanel, the NPCs but the NPCs and players.
But the NPCs dont have the proper layer. Aswell I couldn't find any way how I could fix the problem with the RGB and alpha. Using
maskimage(x, y, img, mode) was the only solution I could find which is not perfect. While using
drawObject(x, y, obj) it doesnt seem to be a problem or atleast I couldnt find one yet.
This is the code I am using:
PHP Code:
for (temp.n: npcs) {
if (n.visible && n.x in |player.x-(player.x%64), (player.x-(player.x%64))+63.95| && n.y in |player.y-(player.y%64), (player.y-(player.y%64))+63.95|) {
if (temp.n.image != NULL && temp.n.ani == NULL) {
if (temp.n.alpha == 1) {
drawimagestretched(((n.x%64)*16)/ir, ((n.y%64)*16)/ir, getImgWidth(n.image)/ir, getImgHeight(n.image)/ir, n.image, 0, 0, getImgWidth(n.image), getImgHeight(n.image));
}
else {
maskimage(((n.x%64)*16)/ir, ((n.y%64)*16)/ir, n.image, "add");
}
}
else if (temp.n.ani != NULL) {
drawobject(((n.x%64)*16)/ir, ((n.y%64)*16)/ir, n);
}
}
}
for (temp.p: players) {
if (p.x in |player.x-(player.x%64), (player.x-(player.x%64))+63.95| && p.y in |player.y-(player.y%64), (player.y-(player.y%64))+63.95|) {
if (p.alpha > 0) drawobject(((p.x%64)*16)/ir, ((p.y%64)*16)/ir, p);
}
}
Screenshot: