Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-29-2002, 10:28 PM
neomaximus2k neomaximus2k is offline
Registered User
Join Date: Feb 2002
Location: UK
Posts: 324
neomaximus2k is on a distinguished road
Send a message via ICQ to neomaximus2k
Tiles script

[code]
if(tiles[playerx+1.5,playery+2]==1898){
[code]

Ok my question is this, how do i translate the tileset into the number at the end, say if i wanted grass how would i know what to put?
__________________
Beware of thy Inner self
NPC Code:

_.,.__
((o\\o\))
.-. ` \\``
__( )___.o"".,___
=== ~~~~~~~~
==
= Neo

Reply With Quote
  #2  
Old 03-29-2002, 10:40 PM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
NPC Code:

if (playerenters) {
message #v(tiles[x,y]);
}



i believe the grass tile is 511
__________________
[signature]insert here[/signature]
Reply With Quote
  #3  
Old 03-29-2002, 10:47 PM
neomaximus2k neomaximus2k is offline
Registered User
Join Date: Feb 2002
Location: UK
Posts: 324
neomaximus2k is on a distinguished road
Send a message via ICQ to neomaximus2k
Quote:
Originally posted by screen_name
NPC Code:

if (playerenters) {
message #v(tiles[x,y]);
}



i believe the grass tile is 511
I dont actually need that tile, it was an example, i need to know how to work them out
__________________
Beware of thy Inner self
NPC Code:

_.,.__
((o\\o\))
.-. ` \\``
__( )___.o"".,___
=== ~~~~~~~~
==
= Neo

Reply With Quote
  #4  
Old 03-29-2002, 11:14 PM
Jinx Jinx is offline
Radioactive Cow
Jinx's Avatar
Join Date: Sep 2001
Location: I duno...
Posts: 1,217
Jinx is on a distinguished road
Send a message via AIM to Jinx
I read somewhere awhile back how to do this.... can't remember any of it =/

-Jinx
__________________
Confucious2002: Cynical passed it's 2nd review! <3
InsaneFishP0sse: Yea =) Now if only Nemesis weren't dead
Confucious2002: *pokes nem*
InsaneFishP0sse: He got a severe paper cut last week and died of blood loss, very sad
Confucious2002: so unix took over his body?
InsaneFishP0sse: No, actually it was the NPC Server,
InsaneFishP0sse: Now if you PM Nemesis, he will go "I am Nemesis, the PW Admin, I handle almost all Playerworlds currently online"
Reply With Quote
  #5  
Old 03-30-2002, 03:47 AM
Bhala Bhala is offline
Disgruntled Monkey
Bhala's Avatar
Join Date: Mar 2001
Posts: 779
Bhala is on a distinguished road
i know theres a simple way to find the tile number based on its place in the tiles by useing hex nums but i dont remember it
Reply With Quote
  #6  
Old 03-30-2002, 04:39 AM
Gohan43331 Gohan43331 is offline
Registered User
Join Date: Jan 2002
Posts: 87
Gohan43331 is on a distinguished road
Send a message via AIM to Gohan43331
NPC Code:

if (playerenters||timeout) {
message #v(tiles[x,y]);
timeout = .05;
}



Lay a bunch of tiles out, and then open notepad
Reply With Quote
  #7  
Old 03-30-2002, 07:10 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
When you move over a tile in the editor it
gives you the tile on the status bar on the lower
right corner. It gives you a (x,y), to convert it
to a tile number just do x+y*16, or in hex
0x[y as hex number][x as hex number]
Reply With Quote
  #8  
Old 03-30-2002, 09:14 AM
Bhala Bhala is offline
Disgruntled Monkey
Bhala's Avatar
Join Date: Mar 2001
Posts: 779
Bhala is on a distinguished road
Oh so thats how lol
Reply With Quote
  #9  
Old 03-30-2002, 04:44 PM
neomaximus2k neomaximus2k is offline
Registered User
Join Date: Feb 2002
Location: UK
Posts: 324
neomaximus2k is on a distinguished road
Send a message via ICQ to neomaximus2k
Quote:
Originally posted by Stefan
When you move over a tile in the editor it
gives you the tile on the status bar on the lower
right corner. It gives you a (x,y), to convert it
to a tile number just do x+y*16, or in hex
0x[y as hex number][x as hex number]
ok so the grass tile is x=15 y=31

so

15+31*16=511
or
(15+31)*16=736

neither one works, with that tile command so am i doing somet wrong?
__________________
Beware of thy Inner self
NPC Code:

_.,.__
((o\\o\))
.-. ` \\``
__( )___.o"".,___
=== ~~~~~~~~
==
= Neo

Reply With Quote
  #10  
Old 03-30-2002, 11:53 PM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
Quote:
Originally posted by Kaimetsu
The co-ords of grass are not that at all. They're (15,127).
i think he was using the x and y in the level
__________________
[signature]insert here[/signature]
Reply With Quote
  #11  
Old 03-31-2002, 12:07 AM
Kadar Kadar is offline
Registered User
Join Date: Jan 2002
Posts: 636
Kadar is on a distinguished road
Quote:
Originally posted by screen_name


i think he was using the x and y in the level
There are 3 grass tiles
all on the very bottom row..
__________________
Reply With Quote
  #12  
Old 03-31-2002, 12:23 AM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
Quote:
Originally posted by Kadar

There are 3 grass tiles
all on the very bottom row..
yes i know, and i didnt mean to quote kai up above, some guy said that it wasn't working for him, he was using the level coordinates, not the tile set
__________________
[signature]insert here[/signature]
Reply With Quote
  #13  
Old 03-31-2002, 12:43 AM
konidias konidias is offline
Old Bee
konidias's Avatar
Join Date: Jul 2001
Location: Orlando, FL
Posts: 7,222
konidias will become famous soon enough
Send a message via AIM to konidias
Quote:
Originally posted by neomaximus2k


ok so the grass tile is x=15 y=31

so

15+31*16=511
or
(15+31)*16=736

neither one works, with that tile command so am i doing somet wrong?
You have to turn 511, or 736 into HEX and use the hex value. (just open up windows calculator, go in advanced mode, and switch from decimal to hex (after the number is shown in decimal) and it will convert it for you.

Or you can just put "15+31*16" in as the tile value, that works also.
__________________

Put this image in your sig if you support Bomy Island! (g2k1 revision)
play bomberman while you wait!


Reply With Quote
  #14  
Old 03-31-2002, 01:25 AM
Er1c Er1c is offline
Registered User
Er1c's Avatar
Join Date: Mar 2001
Location: Chicago, IL
Posts: 791
Er1c is on a distinguished road
Try using
NPC Code:
updateboard x,y,width,height;

when you change the tiles on the board... and you don't have to use hex.
__________________
Eric Kraft
Reply With Quote
  #15  
Old 03-31-2002, 02:03 AM
Neonight Neonight is offline
where da wmdz at
Neonight's Avatar
Join Date: Jun 2001
Location: Windsor, Illinois
Posts: 3,665
Neonight is on a distinguished road
Send a message via AIM to Neonight
Quote:
Originally posted by Stefan
When you move over a tile in the editor it
gives you the tile on the status bar on the lower
right corner. It gives you a (x,y), to convert it
to a tile number just do x+y*16, or in hex
0x[y as hex number][x as hex number]
Or, in Laymens (sp?) Terms:

Open a paint program that has a grid
Each tile is 16x16, just look at the number and divide it by 16...
I'm pretty sure that'll work.
Reply With Quote
  #16  
Old 03-31-2002, 02:19 AM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
Quote:
Originally posted by Neonight


Or, in Laymens (sp?) Terms:

Open a paint program that has a grid
Each tile is 16x16, just look at the number and divide it by 16...
I'm pretty sure that'll work.

you are all making it harder than it has to be
__________________
[signature]insert here[/signature]
Reply With Quote
  #17  
Old 03-31-2002, 02:41 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
Re: Tiles script

Quote:
Originally posted by neomaximus2k
[code]
if(tiles[playerx+1.5,playery+2]==1898){
[code]

Ok my question is this, how do i translate the tileset into the number at the end, say if i wanted grass how would i know what to put?
do you have AIM ?

i can explain this better over AIM ...
i just learned how to properly do this too ...
Reply With Quote
Reply


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 10:50 PM.


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