Thread: tiletype(x,y)
View Single Post
  #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