Jump to content

Development Helpers


Recommended Posts

I am looking to make mods for a creature and an inventoriable object. I have some old code from DS that I am trying to update.

I used to be able to use this:

--Testing only
function SimInit(player)
	local x, y, z = player.Transform:GetWorldPosition()
	GLOBAL.SpawnPrefab("item").Transform:SetPosition(x, y, z)
end

AddSimPostInit(SimInit)

I tried checking into where SimPostInit is called, but the only reference i found calling it passed in nil (which matches my error).

I also tried AddPrefabPostInit, with "ThePlayer" - but that did not produce any effect. Beyond doing it directly, I also tried the code from "Starter Inventory," but that also did nothing.

For testing purposes, are there simple ways to spawn things?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...