![]() |
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 x_x |
Never saw no other reason to use this before, but i gave it a shot.
No dice for me though, -1 all the way. |
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. |
Nope for both of those =(
|
are you on a gmap
|
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: |
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 |
Quote:
|
Quote:
|
Yes.. setshape2 also uses tiletypes.
|
Quote:
|
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] |
And here I thought you had 'owned' gscript. Guess it is, after all, the other way around?
|
Quote:
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}; 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 -_- |
Quote:
Quote:
|
All times are GMT +2. The time now is 12:41 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.