Quote:
Originally Posted by scriptless
Okay, so this is giving me problems... more specifically its making npc's a good distance away say "Hit".. It's in the weapon npc... cx/cy are the cordinate x and y that I want to check at.. (top left of the hole dug).. Should be 2x2 tiles. But this seems to affect npc's further away.
PHP Code:
for(temp.n : findareanpcs(this.cx, this.cy, this.cx + 1, this.cy + 1)){
temp.n.chat = "Hit!";
}
It's giving it a huge gap between the npc I dug and the ones around it... :x
Edit:
Okay, sorry I guess thats x/y/w/h I needed to just supply 2,2 for the width,height... for some reason I was entering ending x/y cords. My bad, sorry.
|
looking at the original script:
Quote:
Originally Posted by scriptless
PHP Code:
//#CLIENTSIDE
function onCreated() {
this.x = player.x + 1.0 + vecx(player.dir) * 2;
this.y = player.y + 1.0 + vecy(player.dir) * 2;
for ( this.iy = 0; this.iy < 2; this.iy ++ ) {
for ( this.ix = 0; this.ix < 2; this.ix ++ ) {
this.checkX = this.x+this.ix;
this.checkY = this.y+this.iy;
tiles[this.checkX, this.checkY] = this.replaceTiles[this.ix+this.iy*2];
}
}
updateboard(this.x,this.y,2,2);
}
|
is there still not a break; for when 4 grass tiles have been detected on clientside?
if not then it could be triggering to the server up to 4 times and ultimately checking a larger region on serverside than necessary