I am trying to make a block (Dimensions 32 x 36) detect if my mouse is over it through a class. I lay the block using
NPC Code:
putnpc2();
But it doesn't detect it! Can somebody help me out?
PHP Code:
function onCreated() {
setTimer(0.05);
}
function onTimeout() {
if (mousex in | this.x, this.x + 2 | && mousey in | this.y, this.y + 2 | ) {
player.chat = "detected!";
with(findimg(201)) {
text = "moo";
style = "bc";
textshadow = true;
shadowcolor = "0 0 0";
zoom = 0.75;
x = mousex;
y = mousey;
}
}
setTimer(0.05);
}
PHP Code:
if ( mousex in | this.x, this.x + 2| && mousey in | this.y, this.y + 2|) {