Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Tiles... (https://forums.graalonline.com/forums/showthread.php?t=26344)

nyghtGT 03-26-2002 04:23 PM

Tiles...
 
Ok, I need to know how to find thevalues of tiles on pics1.png:
NPC Code:

NPC Code:

function laydetail() {
brick={0x8A9, 0x8AA};
tiles[px,py] = brick[0];
tiles[px2,py2] = brick[1];
updateboard px-1,py-1,3,3;
updateboard px2-1,py2-1,3,3;
}




The part above in bold is what i need to know how to find ... Those are for the two tiles at the top of the castle stairs. I want to know how to find the value like that for any tile on pics1.png ...

Please help ...

Spanko 03-26-2002 08:07 PM

The simplest way is just placing it somewhere and then checking in the board array at that tiles position.
Another way is just by checking up on the numbers at the bottom of the tileset screen, one of them is the x,y position of the tile on the tileset, take it's x and y and do the following calculation: x+y*16 and you have the tiles index.
It's probably not as efficient as making Graal make use of the tiles hex value, but it does work.

TDO2000 03-26-2002 08:58 PM

he probably wants to know hoe to get the hex value of this...
get some prog which is able to make normal values to hex-values ^-^

screen_name 03-26-2002 09:15 PM

why would u want to use hex??

just use tiles[x,y] to find out the number of the tile??

nyghtGT 03-27-2002 04:12 AM

Quote:

Originally posted by screen_name
why would u want to use hex??

just use tiles[x,y] to find out the number of the tile??

I did that ...

So what I do is just add that to the script ?
NPC Code:

NPC Code:

function laydetail() {
brick=0x8A9;
tiles[px,py] = brick[0];
updateboard px-1,py-1,3,3;
}




What I dont understand is '0x8A9.' How do I achieve this value ? Cause when I do the 'tiles[x,y]' thing it does not even look remotely like that does...

Saga2001 03-27-2002 05:51 AM

Do This on windows:
Start > Run (Type calc) > OK
In Calculator, type in the tile number as a decimal, make sure your calculator is in scientific mode, and than press hex, there is your hexidecimal value, however those numbers look octal to me...

nyghtGT 03-27-2002 08:24 AM

Quote:

Originally posted by Saga2001
Do This on windows:
Start > Run (Type calc) > OK
In Calculator, type in the tile number as a decimal, make sure your calculator is in scientific mode, and than press hex, there is your hexidecimal value, however those numbers look octal to me...

OMFG!

Thank you so much.

screen_name 03-27-2002 09:57 AM

put the tile on 0,0 and then do this


if (playerenters) {
say2 #v(tiles[0,0]);
}

:P

nyghtGT 03-27-2002 10:12 AM

Quote:

Originally posted by screen_name
put the tile on 0,0 and then do this


if (playerenters) {
say2 #v(tiles[0,0]);
}

:P

yea i'd get the decimal value then change it to Hex and now it works ...

screen_name 03-27-2002 10:21 AM

Quote:

Originally posted by nyghtGT

yea i'd get the decimal value then change it to Hex and now it works ...

well, thats good, hope u get what u want

nyghtGT 03-27-2002 11:01 AM

Quote:

Originally posted by screen_name


well, thats good, hope u get what u want

Oh, I did ...

http://forums.graal2001.com/forums/s...threadid=26384


All times are GMT +2. The time now is 09:36 PM.

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