Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:02 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.