ID:168107
 
I only just started using byond, and i looked through the forums for how to make a teleport turf, but i only found stuff about how to find out where to teleport, not how. Can someone tell me plz?
Diggsey wrote:
I only just started using byond, and i looked through the forums for how to make a teleport turf, but i only found stuff about how to find out where to teleport, not how. Can someone tell me plz?

turf/teleport{icon='teleport.dmi';Entered() usr.loc=locate(1,1,1)} // change the 3,2,1 to the location of your choice.  By the way, in order from left to right: 3=x axis, 2=y axis,& 1=z axis... if you didn't know.
In response to Branks
It'd be better to use Entered().
In response to Artemio
Artemio wrote:
It'd be better to use Entered().

he did see:
"{icon='teleport.dmi';Entered() "
In response to Meganutter
'Course he did, after Artemio said it. There's an edit button for a reason.
In response to Mysame
Mysame wrote:
There's an edit button for a reason.
no way!!! cool, never seen it anyway, thanks for mentioning it
In response to Meganutter
or you could be specific and be all like
     
area
var/point
New()
..()
tag = point
Marker
Starting
point = "Starting"
Start2/point="Starter2"
Start3/point="Starter3"
Paths
Entered(atom/movable/O)
//Rife
if(ismob(O))
if(point == "Starting")
O.loc = locate("Starter2")
else if(point == "Starter2") O.loc = locate("Starter3")
else return //blahblah

Well, it can get confusing, but as long as your organize it and put a few comments here and there. Leave some feedback, is this type of 'teleporting' good to use?

In response to Branks
In order to program anything, you have to understand what're the things that are involved.

Lets talk about teleporting. What actually happens in it?

Player moves; enters turf.
Turf changes player's location.

Therefore, the only thing involved in teleporting would be:

mob/Move().
turf/Enter().
turf/Entered().
loc (variable).

Now you have to consider what'd be relevant to you.

mob/Move() wouldn't be the best way of teleportation. turf/Enter() shouldn't be used in teleportation.

So only turf/Entered() and loc are needed. So go look up what they do if you don't know. After all that, you start programming.
In response to DeathAwaitsU
I've always used areas, is that bad? Oo
In response to Mechanios
no. i normally use area, but sometimes turf works better for the given situation.
In response to Jamesburrow
Jamesburrow wrote:
no. i normally use area, but sometimes turf works better for the given situation.

objs are the best, actually, since they don't interfeer with any potential things you may want to add on the map. :P (you can have more than one objs on the same loc)
In response to Unknown Person
I listen and I learn. But wouldn't adding all those objs to map reduce BYOND's limit of objs? (or is it mobs or something else. I can't remember at the moment)
In response to Mechanios
Mechanios wrote:
But wouldn't adding all those objs to map reduce BYOND's limit of objs?

It would, but I would guess you wouldn't have more than 65535 teleports on your map. It would only be that useful to use areas and turfs if you had a problem with the object limit, which I doubt a regular game would touch.

~~> Unknown Person
In response to Unknown Person
True. Yeah, I think I'll experiment with this and such. :)