ID:162080
 
How do i set the spawn coordinates?
client
New()
..()
mob = locate(whatever)
Look up locate() and loc in the refrence or read some of the DM guide.
In response to Garthor
Interesting. I've been using mob.loc = locate(whatever)
I'll have to try this in my game too =)
In response to Traztx
how do i teleport someone to a location on a map, for example when he dies, he teleports to coordinates (9,1,1) on Snakeway.dmm
In response to Iraqii
The z is only 1 if that is the only map. If you are loading multiple maps, I think you'll have to keep track of world.maxz, such as in a list. So instead of (9,1,1) it would be (9,1,mymap["Snakeway.dmm"]) assuming you maintain mymap whenever you load maps.
In response to Traztx
That was a typo.
In response to Traztx
You shouldn't be using absolute coordinates at all, really. Setting a tag using the map editor, and then locate()ing that is a much better idea.
In response to Garthor
Basically, i need to tag an object(snakeway turf) and when the user die()s i use the locate() to take him to the tagged object? How is a tag set. i clicked ur link i dont get a word of it.
In response to Iraqii
Open the map editor, right-click on the turf, select Edit, and change the tag variable.
In response to Garthor
Would it be more sensible to set the an area tag at runtime? Or would that be a bad idea?
In response to Mechanios
No. That would make less sense. A negative amount of sense, in fact.
In response to Garthor
Why not?

area
Marker
Transfers

var/point = ""
New()
..()
tag = point

Beta/point = "Beta"


This is what I do. It's a bit easier than right-clicking and setting tags all the time.
In response to Mechanios
Sometimes we must choose between what is right, and what is easy.
In response to Obs
But can you tell me anything wrong with the above? ;)
In response to Mechanios
Because you're defining a new type for every single destination, which also means that you'd have to go back to your code if you want to change a destination to be grass instead of dirt. Mapmaking should be as separated from code writing as possible.
In response to Garthor
i set a tag called "dead" to a turf.but when i die and i src.loc=locate("dead"),the screen goes black...wut could be the problem?