Hello,
I've got a working code for spawning items into the game world. However, the items spawn every time I load up the game again. Would anyone know how to make the specific Item only spawn once into the world, and then never again. Here is the code I'm using..
local function SpawnInventoryItem(sq)
local x, y, z = sq:getX(), sq:getY(), sq:getZ()
if x == 8184 and y == 8486 and z == 0 then
sq:AddWorldInventoryItem("Base.WaterBottleEmpty", 0, 0, 0)
Events.LoadGridsquare.Remove(SpawnInventoryItem) --once
end
end
Events.LoadGridsquare.Add(SpawnInventoryItem)
Thanks,
-Raven
Edit* I've gotten my answer to this question. Thanks again, ProjectSky.