blahpers Posted June 17, 2015 Share Posted June 17, 2015 Greetings, Long story short: I've seen mods that spawn a prefab in an AddPrefabPostInit like so:AddPrefabPostInit("forest", function(inst) print("*** Spawning a thing") myprefab = GLOBAL.SpawnPrefab("myprefab")end)This gets called every time one loads a save game. So, what keeps this from accumulating multiple "myprefabs" as the player saves, exits, and reloads? Is there something special about this phase that prevents spawned prefabs from being saved, or is there something about the prefab itself that necessitates it being recreated every time a map is loaded or created? Link to comment Share on other sites More sharing options...
Mobbstar Posted June 17, 2015 Share Posted June 17, 2015 For starters, this prefab would always end up at 0/0 in the world. I assume that prefab is some kind of dummy and not persistant, because else it would make a new one everytime, as you said. Can you please show me a mod that does this? Your sample is rather confusing (and syntactically incorrect). Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.