ID:827829
 
Keywords: items, runtime, spawning, turf
(See the best response by Murrawhip.)
Im having a problem making a turf spawn an Item at runtime, also, could it be made to appear only to a player who hasnt obtained the item, using a variable or something to regulate this?
turf
Turfs
Fire_Res_Spawner
density=0
New()
var/obj/Items/Fire_Resistance/L=new/obj/Items/Fire_Resistance
L.loc=src.loc
Might need to use x/y/z

i.e.
        New()
..()
var/obj/FRS/f = new(locate(src.x,src.y,src.z))
In response to Pirion (#1)
That is wrong..
In response to The Motto (#2)
The Motto wrote:
That is wrong..

You might want to explain how, and show an alternative.
Best response
Nick_10482 wrote:
New()
var/obj/Items/Fire_Resistance/L=new/obj/Items/ Fire_Resistance
L.loc=src.loc

This was close to being correct.
You want this obj's loc to be equal to a turf, not a turf's loc. A turf's loc is going to be the area that it resides in.
If we were looking at your mob:
src.loc would be the turf that your mob is standing on.
src.loc.loc would be the area that the turf is in.

As for making some item appear only to a player that doesn't have it, I'm going to point you to Forum_Account's Visibility Groups. I haven't used it, but it seems to be what you're looking for.
Oh thanks you guys very much! This is exactly what I needed, thx for all your input!