ID:149792
 
I have many of pictures or (tiles) in my game. But you can walk over all of them. How do you make a solid tile? a tile that warps you to a different map? or water tiles? please let me know.
Can't walk through: look up density

Warping: Look up Enter(), and Entered()
In response to Nadrew
I mean, how do you make them solid.*

how do you make them water like.*

and how to make you warp.*
In response to Pizzaro
Pizzaro wrote:
I mean, how do you make them solid.*
turf/wall/density = 1; opacity = 1
how do you make them water like.*
turf/water/density = 1
and how to make you warp.*
turf/warp/Entered(mob/M)

M.loc=locate(10,10,1) // x,y,z (change z for different maps)

There that should work for you, but you may want to add it into your already exisiting code under where you should have the icon = 'wall.dmi' etc..

LJR
In response to LordJR
Is there an easy way to make all of one tiles always be solid, water, or warped?
In response to Pizzaro
Just set them up as I told u, and then on the map each time u place one down, it will be solid as you have defined.

LJR
You should read my tutorial to learn the basics of coding.

http://www.angelfire.com/games4/byond

Or read ZBT found under tutorials.


-Rcet
In response to LordJR
I don't get where you put that code.

I have tried first right clicking on the tile and changing opacity and density to 1.

When I do this I have to do every single tile this way! It takes to long! Is there a way to make where all tiles of that same thing are alike?

Someone please help.
In response to Pizzaro
I don't care where u put it, just put it someone in your *.dm file!!
The icons will then appear on the left as icons with pics.
Post what code you have here if u want more help and don't understand.

LJR
In response to Pizzaro
Pizzaro wrote:
I mean, how do you make them solid.*

how do you make them water like.*

and how to make you warp.*

I think you're gonna need a long answer to this one. But to start, you need to be clear on what you mean by "water like". Water does different things in different games. Is it supposed to block the player? Drown them? Impede movement slightly?

To make a tile solid, all you have to do is go into its turf definition and set density=1:
turf/wall
density=1
// also opacity=1 if you don't want people to see through it

For a turf that teleports people about, there are many approaches. You should look up any tutorials you can find on the subject, which will help you better, but for now this is a basic starting point:
turf/warp
var/otherx
var/othery
var/otherz

Entered(atom/movable/A)
// do not use Move() here, or it will call Entered() for the new
// destination and you end up in an infinite loop
A.loc=locate(otherx,othery,otherz)

Water is trickier, depending in what you want. If you're looking to just impede the player's motion a bit, I suggest you look up demos on movement speed and terrain.

Lummox JR