Thread: Mouse Over
View Single Post
  #1  
Old 09-10-2011, 06:11 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Mouse Over

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.xthis.| && mousey in this.ythis.| ) {
    
player.chat "detected!";
    
with(findimg(201)) {
      
text "moo";
      
style "bc";
      
textshadow true;
      
shadowcolor "0 0 0";
      
zoom 0.75;
      
mousex;
      
mousey;
    }
  }
  
setTimer(0.05);

PHP Code:
if ( mousex in this.xthis.2| && mousey in this.ythis.2|) { 
__________________
Reply With Quote