Okay, Now in GS2, but It still doesn't work. I don't understand how it's testing for a stake. I used the old script, which worked before for checking for stakes, but it doesn't seem to be working
PHP Code:
//#CLIENTSIDE
function onWeaponfired()
{
setani dr-hammer,;
this.putx = playerx+.5+vecx(playerdir)*2;
this.puty = playery+.75+vecy(playerdir)*2;
for (this.i=0; this.i<2; this.i++)
{
for (this.j=0; this.j<2; this.j++)
{
b = board[this.putx+i+64*(this.puty+this.j)];
bx = b % 16;
by = int(b / 16);
if (!(bx==10+this.i && by==20+this.j) && !(bx==4+this.i && by==103+this.j))
{
this.isstake=0;
}
else
{
this.isstake=1;
}
}
}
if (this.isstake==1)
{
this.isstake=0;
board[putx+64*puty] = 10+112*16;
board[putx+1+64*puty] = 11+112*16;
board[putx+64*(puty+1)] = 10+113*16;
board[putx+1+64*(puty+1)] = 11+113*16;
updateboard putx,puty,2,2;
play("axe.wav");
}
else
{
play("arrowon.wav");
}
}