realitymeltdown Posted January 1, 2017 Share Posted January 1, 2017 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 More sharing options...
Aquaterion Posted January 1, 2017 Share Posted January 1, 2017 if you mean spawning things for testing, you don't need to code that, just open the DST console, and write c_spawn("petals", 5) or c_give("petals", 5). Of course replace petals with your prefab's name, and 5 with how many you want to spawn/get Link to comment Share on other sites More sharing options...
realitymeltdown Posted January 1, 2017 Author Share Posted January 1, 2017 Oh, silly me. I am used to using code to get going as fast as possible. I do not suppose there are any tricks, like getting a one-click new game setup? Link to comment Share on other sites More sharing options...
Aquaterion Posted January 1, 2017 Share Posted January 1, 2017 you can check all commands in scripts/consolecommands.lua I believe there's some comment including the name "adventure" in it that gives you some starting stuff Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now