hectorzx Posted October 15, 2019 Share Posted October 15, 2019 It is posible to add recipes only to a preset (level)? The only function that i have found is: AddLevelPreInit("MyPresetLevel", LevelInit) local function LevelInit(level) ... Recipe("MY_receipe", {Ingredient("iron", 2), Ingredient("twigs", 1)}, RECIPETABS.ARCHAEOLOGY, TECH.SCIENCE_ONE) ..... end But It is not working,It seems that you can only put in there code that alter the level generation? Link to comment Share on other sites More sharing options...
Ultroman Posted October 16, 2019 Share Posted October 16, 2019 My guess is that recipes cannot be added before the recipe system has been added during the world creation. If it is possible to do a DoTaskInTime call, you can wrap your Recipe call in that, and delay it a few seconds until the world has been loaded. Link to comment Share on other sites More sharing options...
hectorzx Posted October 18, 2019 Author Share Posted October 18, 2019 I actually found a way!! function LoadRecipes(player) if GLOBAL.GetWorld().meta.level_id == "3in1" then -------Loaad recipes------ end end AddSimPostInit(LoadRecipes) 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.