Thread: my hammer broke
View Single Post
  #12  
Old 05-28-2006, 10:00 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
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=0this.i<2this.i++)
  {
    for (
this.j=0this.j<2this.j++) 
    {
      
board[this.putx+i+64*(this.puty+this.j)];
      
bx 16;
      
by int(16);
      if (!(
bx==10+this.&& by==20+this.j) && !(bx==4+this.&& 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");
  }

Reply With Quote