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);
}