Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:08 AM.


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