so does anyone actually know what specifications are needed to spawn in grass geckos from the tufts of grass.
know for sure it has to be transplanted grass but like is there a set timer that a grass tuft has to be placed for it to have a chance of spawning the geckos
that is what i want to know
some things i found withing game code
elseif not TheWorld.state.iswinter
and picker ~= nil
and picker:HasTag("player")
and math.random() < TUNING.GRASSGEKKO_MORPH_CHANCE then
triggernearbymorph(inst, true)
end
local function onmorphtimer(inst, data)
local morphing = data.name == "morphing"
if morphing or data.name == "morphrelay" then
if morphing and canmorph(inst) then
local x, y, z = inst.Transform:GetWorldPosition()
if #TheSim:FindEntities(x, y, z, TUNING.GRASSGEKKO_DENSITY_RANGE, { "grassgekko" }) < TUNING.GRASSGEKKO_MAX_DENSITY then
local gekko = SpawnPrefab("grassgekko")
gekko.Transform:SetPosition(x, y, z)
gekko.sg:GoToState("emerge")
local partfx = SpawnPrefab("grasspartfx")
partfx.Transform:SetPosition(x, y, z)
partfx.Transform:SetRotation(inst.Transform:GetRotation())
partfx.AnimState:SetMultColour(inst.AnimState:GetMultColour())
triggernearbymorph(inst, false)
inst:Remove()
return
end
end
inst.components.timer:StartTimer("morphdelay", GetRandomWithVariance(TUNING.GRASSGEKKO_MORPH_DELAY, TUNING.GRASSGEKKO_MORPH_DELAY_VARIANCE))
triggernearbymorph(inst, false)
end
end
local function makemorphable(inst)
if inst.components.timer == nil then
inst:AddComponent("timer")
inst:ListenForEvent("timerdone", onmorphtimer)
end
end