Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Please Help If You Can (https://forums.graalonline.com/forums/showthread.php?t=23389)

Wes2000 02-09-2002 06:40 AM

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

Wes2000 02-09-2002 11:35 AM

:( please anyone :(

Poogle 02-09-2002 10:25 PM

Quote:

Originally posted by Wes2000
:( please anyone :(
Theres 1 in the Weapons folder uynder hammer.txt and check newfeatures2001.txt its in there around 1,?? and 2.?? I think its in 2.03 Check it even gives you a meneral script

Wes2000 02-09-2002 11:42 PM

I dont want to take that one =/

Kai can you help me?

joseyisleet 02-09-2002 11:45 PM

-=Josey=-
Even a dog who isn't happy can be handed a bone and still be unhappy. Sheesh, he just told you what to look at. If you think you know where the problem is (which you said you did), work on it. Don't just randomly ask for help from one person when your script doesn't work like it's supposed to. Myself, I'd just rewrite the whole thing and make sure it all works as I'm going along.

Wes2000 02-09-2002 11:48 PM

This is one of my first times posting a topic for help with a script =/ I have looked at it, messed with it, and changed it a lot but i still cant get it to work. Is it so wrong that I want my own script to work? I thought that this is what the board is for... its not like i havnt tried to fix it myself... :(

Wes2000 02-10-2002 12:06 AM

Thanks Kaimetsu that helped me fix the problem =)


All times are GMT +2. The time now is 05:31 AM.

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