ID:158719
 
like. how do i remake a turf (that i put in the map while editing) ingame. the original turf has been deleted by another turf(using a verb). and the fake turf that replaced the original turf only lives for 10sec then the fake turf gets deleted. after that, how do i remake the original turf that has been deleted by that fake turf that lives 10sec?
Use the forum search next time. I gave a solution in this very recent topic.
In response to Kaiochao
wat do people usually do ?
something like
Grass
icon='terrain.dmi'
icon_state ="grass"
density=0
New()
spawn(100)
new /turf/terrain/Grass(locate(x,y,z))

or your way ?
In response to XskyflakezX
You should be using src instead of locate(x,y,z). They're going to be exactly the same, except one is stupidly roundabout. Similarly, for a mob, src.loc is going to be the same as locate(x,y,z) except in very strange circumstances.

And asking "wat do people usually do ?" [sic] is stupid. The question is what's correct, not what's "usually done".
In response to Kaiochao
i need to know this too :(
is there a guide? or an example like demo or tutorials
In response to Frozenflake
Aren't you the OP of the topic I referred to? I gave a solution in there. Pass an argument in New() that contains the old turf's type, then use that to create the old turf.
turf/TemporaryTurf/New(Loc, PreviousType)
..()
spawn(50) //5 seconds
if(ispath(PreviousType)) //to check if it is a valid path
new PreviousType(src) //create a new atom of the type contained in the variable, at src's location

//To create the TempTurf:
new/turf/TemporaryTurf([LOCATION], [LOCATIONS TYPE])
//The things in the parentheses after a "new type" statement are passed on into the type's New() proc.
In response to Kaiochao
:O ohh now i get it =D

tyvm