hectorzx Posted October 15, 2019 Share Posted October 15, 2019 (edited) 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? Edited October 18, 2019 by hectorzx Link to comment https://forums.kleientertainment.com/forums/topic/112733-solved-adding-recipes-to-custom-map/ 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 https://forums.kleientertainment.com/forums/topic/112733-solved-adding-recipes-to-custom-map/#findComment-1272461 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 https://forums.kleientertainment.com/forums/topic/112733-solved-adding-recipes-to-custom-map/#findComment-1273212 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