View Single Post
  #12  
Old 06-05-2006, 08:57 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Bored, might aswell improve it with getImgWidth/Height:


PHP Code:
//#CLIENTSIDE
function onCreated()
{
  
setImg( "imagename");

  
drawoverplayer();
  
dontblock();

  
setTimer( .05);
}

function 
onTimeOut()
{
  if (
player.x in |x, x + (getImgWidth( this.image)/16)|
    && 
player.y in |y, y + (getImgHeight( this.image)/16)|) {
    
setcoloreffect( 1, 1, 1, .4);
  } else 
setcoloreffect( 1, 1, 1, 1);
  
setTimer( .05);
} 
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote