View Single Post
  #1  
Old 02-09-2002, 06:40 AM
Wes2000 Wes2000 is offline
Registered User
Join Date: Dec 2001
Posts: 57
Wes2000 is on a distinguished road
Send a message via AIM to Wes2000
Unhappy Please Help If You Can

Hey, im having some trouble with my hammer for mineing...

// NPC made by Wes2000
if (playerenters) {
tx={1,0,1,2};
ty={0,1.5,3,1.5};
tilex={9,10,6,6,7,8,11,11};
tiley={130,130,129,130,128,128,128,129};
setshape 1,32,32;
}
if (playertouchsme) {
toweapons Hammer;
}
if (weaponfired){
this.tx=playerx+tx;
this.ty=playery+ty;
TileCheck();
}

function TileCheck(){
putx=int(this.tx[playerdir]);
puty=int(this.ty[playerdir]);
b = board[putx+64*puty];
bx = b % 16;
by = int(b / 16);
//-----------------------------------GETS TO HERE---------
if (bx in tilex&&by in tiley){
disableweapons;
disabledefmovement;



the problem- It goes fine for up and left, but it wont work on the right and bottom walls

1- I know the tile set part is right because all the tiles work if i hit them facing left.

2- I think the problem is in the
tx={1,0,1,2};
ty={0,1.5,3,1.5};
but im not sure

3- for left and up it finishs the script (i didnt post it all just the buggy part) but for right and down it gets to the line i put in...

Please help me if you can
__________________
Reply With Quote