View Single Post
  #4  
Old 06-01-2007, 10:32 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Hmm, I'd do it this way...
HTML Code:
function onCreated()
{
  this.setShape(1, 32, 32);
}
function onActionDetected()
{
  //Your thing, use actionPlayer to find out whom did it
}
//#CLIENTSIDE
function onPlayerEnters()
{
  this.onTimeout();
}
function onTimeout()
{
  if (player.x in |this.x - 5, this.x + 5| && player.y in |this.y - 5, this.y + 5|)
  {
    triggeraction(this.x, this.y, "Detected", "");
  }
  setTimer(0.05);
}
__________________
Reply With Quote