In the map editor, you can create new turfs over a turf by holding down CTRL, so my question is, is it possible to do so ingame?
By using the new() proc, it deletes the turf which is under it, is it possible to have it create it above the turf, and have it not delete the one under it?
ID:157207
Apr 24 2010, 10:44 am
|
|
Apr 24 2010, 10:46 am
|
|
You can add the new turf to the other turf's overlays.
|
In response to Emasym
|
|
Old turf to the new turf's underlays is actually the behavior of the map editor.
|
In response to Garthor
|
|
Oh, I see... I'll try and figure out how to make it...
|
In response to Enic
|
|
Yeah well, now I'm stuck at another problem. How do I locate the turf the mob is standing on?
|
In response to Enic
|
|
var/turf/T = mob.loc
|
In response to Skyspark
|
|
That doesn't really work... I already tried it, and it doesn't locate the turf the mob is standing on, but it makes that var the actual mob...
|
In response to Enic
|
|
var/turf/T = new(mob.loc) |
In response to Emasym
|
|
That doesn't really work either. This is how I'm trying it...
var/turf/water/W = new /turf/waters/water2(usr.loc) And now, it kinda deletes the turf under it, and makes a icon of the usr... |
In response to Enic
|
|
Ummm, If you wanna add the overlay and you are sure about the icon of the water2. then
var/turf/T=new(locate(usr.x,usr.y,usr.z)) Well what was surprising is that. Turfs are very arrogant and want a location so bad, that it takes over the loc it gets. I m not really sure abt this but there must be a better way. |
In response to Enic
|
|
The loc of an atom A is the atom which contains A. So, if your mob is src, then src.loc is the loc of that mob, which is usually a turf (though technically it could be any atom, that wouldn't occur unless you explicitly moved it there).
|