Quote:
|
Originally Posted by maximus_asinus
why couldn't you make the sword detect the bush tiles and have it update board via this? I am not the best scripter, and I can see how checking each time you used the sword could lag, but I doubt it'd be noticeable.
|
Simply, you can't updateboard on a gmap.
NPC Code:
if (keypressed) {
this.test_x = int(playerx + 1.0) + 2*vecx(playerdir);
this.test_y = int(playery + 1.5) + 2*vecy(playerdir);
if (keydown(5)) {
if (tiles[this.test_x,this.test_y] == 2 && tiles[this.test_x+1,this.test_y] == 3 && tiles[this.test_x,this.test_y+1] == 18 && tiles[this.test_x+1,this.test_y+1] == 19) {
tiles[this.test_x,this.test_y] = 677;
tiles[this.test_x+1,this.test_y] = 678;
tiles[this.test_x,this.test_y+1] = 693;
tiles[this.test_x+1,this.test_y+1] = 694;
putleaps 0,this.test_x,this.test_y;
updateboard this.test_x,this.test_y,2,2;
}
}
}
Put a //#CLIENTSIDE above that and it mimics the default bush script. It will drop rupees and items on it's own. Not Classic's rupees but the default bush drop items. It will slash the bush for everyone, and the bush will reappear on it's own.
All of these automatic things, they shouldn't be happening. I should have to write this serverside to get the bush to be slashed for everyone. I should have to write special code for the items to drop. I should have to cache the bush locations so that I can redraw them.
Now, the clientside updateboard updating for everyone isn't exactly a bad thing, this helps a lot. But all of the other stuff screws me up.