ID:158871
 
Hello, i am wondering, how would you load a truf into a xyz location? I tried to use locate, but apparently the value for turfs is constant?


Should i just switch all my turfs into objs? or is that not good?
Turf location is indeed constant and can not be changed. Changing into objects is a way, or you could just load the icon and icon_state of the turf on that location, then apply it to that location on load.
Turfs cannot move, but the location put into the new() will be the location the spawn at.

new /turf/molehill( locate( x, y, z ) )
In response to Mysame
Mysame wrote:
Changing into objects is a way

Turfs are already objects. ;P But if you mean /objs, then I wouldn't say switching all of your turfs into obj types is recommended or even always feasible. It's even not strictly possible as if you have a map there will always be turfs.

or you could just load the icon and icon_state of the turf on that location, then apply it to that location on load.

That assumes all he ever needs to save are those 2 vars only.
In response to Kaioken
Kaioken wrote:
Mysame wrote:
Changing into objects is a way

Turfs are already objects. ;P But if you mean /objs, then I wouldn't say switching all of your turfs into obj types is recommended or even always feasible. It's even not strictly possible as if you have a map there will always be turfs.

or you could just load the icon and icon_state of the turf on that location, then apply it to that location on load.

That assumes all he ever needs to save are those 2 vars only.

You're really just pointing those things out plainly to have pointed something out >.<