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 06-08-2004, 09:00 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
tiletype(x,y)

I can't seem to get it to work =/
Any suggestions?
It always says -1...
I tried ti when attached to the npc and when off the npc
tried it server and client side...
I don't know what else to do
__________________
Do it with a DON!
Reply With Quote
  #2  
Old 06-08-2004, 10:03 AM
Andy0687 Andy0687 is offline
Enigma
Join Date: Feb 2002
Posts: 1,072
Andy0687 is on a distinguished road
Never saw no other reason to use this before, but i gave it a shot.

No dice for me though, -1 all the way.
__________________
Reply With Quote
  #3  
Old 06-08-2004, 11:19 AM
VeX_RaT_Boy VeX_RaT_Boy is offline
WannaBe Scripter
VeX_RaT_Boy's Avatar
Join Date: Aug 2002
Location: Norway
Posts: 960
VeX_RaT_Boy is on a distinguished road
Send a message via ICQ to VeX_RaT_Boy Send a message via AIM to VeX_RaT_Boy Send a message via Yahoo to VeX_RaT_Boy
I did not test this, but might it be tiletype[x,y] ?

Or only working serverside/clientside?

I did not test this, I'm only giving suggestions.
__________________
-Kjetil Valen
Reply With Quote
  #4  
Old 06-08-2004, 11:55 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Nope for both of those =(
__________________
Do it with a DON!
Reply With Quote
  #5  
Old 06-08-2004, 12:40 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
are you on a gmap
Reply With Quote
  #6  
Old 06-08-2004, 03:25 PM
Ningnong Ningnong is offline
Registered User
Ningnong's Avatar
Join Date: Nov 2002
Location: < -- way
Posts: 262
Ningnong is on a distinguished road
I just tested it online and it works. Gives 0 on non-blocking tiles, 11 in water, and 22 on blocking tiles.

edit: just tested it offline and it works also. Note: this is using the era tileset.

NPC Code:

//#CLIENTSIDE
if (created) timeout = .05;
if (timeout){
message #v(tiletype(playerx,playery));
timeout = .05;
}

__________________
Former Global Scripting Team Member



Last edited by Ningnong; 06-08-2004 at 03:54 PM..
Reply With Quote
  #7  
Old 06-08-2004, 05:10 PM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
tiletype( x, y ) returns the neworder tiletype used for setshape2 on x,y

Tiletype / tile index (use with setshape)
nonblock 0
hurt underground 2
chair 3
bed upper 4
bed lower 5
swamp 6
lava swamp 7
near water 8
water 11
lava 12
throw-through 20
jump stone 21
blocking 22


this be what I have in my commands.rtf, you're probably just not using a neworder tileset
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #8  
Old 06-08-2004, 08:58 PM
Andy0687 Andy0687 is offline
Enigma
Join Date: Feb 2002
Posts: 1,072
Andy0687 is on a distinguished road
Quote:
Originally Posted by Python523
are you on a gmap
I was, is that a problem
__________________
Reply With Quote
  #9  
Old 06-08-2004, 11:05 PM
Malinko Malinko is offline
Unholy Nation
Join Date: Mar 2004
Location: Massachusetts, U.S.A.
Posts: 1,782
Malinko is on a distinguished road
Send a message via AIM to Malinko
Quote:
Originally Posted by Ningnong
I just tested it online and it works. Gives 0 on non-blocking tiles, 11 in water, and 22 on blocking tiles.
Similar to setshape2, 0 = non-blocking, while 22 = blocking. Never knew 11 was water, but 3 = sitting/chair.
Reply With Quote
  #10  
Old 06-08-2004, 11:44 PM
Ningnong Ningnong is offline
Registered User
Ningnong's Avatar
Join Date: Nov 2002
Location: < -- way
Posts: 262
Ningnong is on a distinguished road
Yes.. setshape2 also uses tiletypes.
__________________
Former Global Scripting Team Member


Reply With Quote
  #11  
Old 06-09-2004, 01:36 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally Posted by Andy0687
I was, is that a problem
your x/y tends to be different on a gmap ;o plus if you wanna check if its water on a gmap just use getz and check the value
Reply With Quote
  #12  
Old 06-09-2004, 03:21 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
I know how setshape2 works...
And yes it is on a gmap.
It is for my boat system.

[EDIT]
And this never returns a 0 or anything no matter what. Only -1.
[/EDIT]
__________________
Do it with a DON!
Reply With Quote
  #13  
Old 06-09-2004, 06:55 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
And here I thought you had 'owned' gscript. Guess it is, after all, the other way around?
Reply With Quote
  #14  
Old 06-09-2004, 05:17 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by Lance
And here I thought you had 'owned' gscript. Guess it is, after all, the other way around?
I had and now it had it's revenge on me.
Need to point out anymore obvious things?
And btw I figured it out (With Robin's help)
You have to be using a custom tileset for it to work right.

My alternative to all that want to know:
Instead of doing
NPC Code:
setshape2 x,y,{tiles};



Do this:
NPC Code:
this.shape={tiles};
setshape2 x,y,this.shape;



Then somewhere else in the script do something like:
NPC Code:
if (this.shape[int(playerx-x+0.5)*int(imgwidth(#f)/16)+int(playery-y+1)]=11) {commands;}


(You would use 11 if you wanted to check for water tile, you can change that ;P)

And again.
I am posting this to HELP PEOPLE who have this same problem and use the thing called "Search" and find this thread so they don't post the same topic.
Don't flame me for helping the scripting forum out -_-
__________________
Do it with a DON!
Reply With Quote
  #15  
Old 06-09-2004, 05:24 PM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
Quote:
Originally Posted by zokemon
You have to be using a custom tileset for it to work right.
Quote:
Originally Posted by me
you're probably just not using a neworder tileset
good job reading my post there,
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
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 07:40 PM.


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