Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Mouse Over (https://forums.graalonline.com/forums/showthread.php?t=134264525)

Emera 09-10-2011 06:11 PM

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|) { 


fowlplay4 09-10-2011 06:25 PM

I don't see any sign of //#CLIENTSIDE in your code.

Emera 09-10-2011 06:38 PM

Quote:

Originally Posted by fowlplay4 (Post 1667713)
I don't see any sign of //#CLIENTSIDE in your code.

Schoolboy error. Thank you!


All times are GMT +2. The time now is 06:30 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.