Flypaste Posted April 6, 2014 Share Posted April 6, 2014 (edited) What I'm trying to do at the moment is be able to build the friendly scion of the nightmare chesspieces out of the recipes tab. The way I'm trying to do it is have a placer spawn the scion.However, I don't know how to make placers, and looking at an existing mod didn't help me very much because the placer was for a new prefab, it was a monster, so it gave me my basis. This is what I have right now, but I honestly don't know what to do with it.MakePlacer( "common/nightmare_knight_placer", "knight_nightmare", "knight_nightmare_build", "idle_loop" )MakePlacer( "common/nightmare_bishop_placer", "bishop_nightmare", "bishop_nightmare_build", "idle_loop" )MakePlacer( "common/nightmare_rook_placer", "rook_nightmare", "rook_nightmare_build", "idle_loop" )I don't know where to put these, or how to reference the paths to the animations properly. I also couldn't find any tutorials sitting around, and my friends who know lua have never done DS before, so i've been forced to turn to you guys for help... Edited April 6, 2014 by Flypaste Link to comment https://forums.kleientertainment.com/forums/topic/34343-help-dont-know-how-to-make-a-new-placer-for-an-existing-prefab/ Share on other sites More sharing options...
Heavenfall Posted April 6, 2014 Share Posted April 6, 2014 So a placer is actually just another simplified prefab. When you look at prefab files they bundle prefabs and makeplacers in the same file - this is just for information structure. It doesn't have relevance to code. A prefab and placer are not linked in that file. Instead, the placer is linked to a prefab via the recipe. So what you can do is something like this in modmain.lua (note the need for an image reference at temprecipe2.atlas!)PrefabFiles = { "newplacer"}local temprecipe2 = GLOBAL.Recipe( "bishop_nightmare", { Ingredient("twigs", 1) }, GLOBAL.RECIPETABS.TOOLS, {SCIENCE = 0}, "newplacer")temprecipe2.atlas = "images/inventoryimages/summonskeleton.xml"GLOBAL.STRINGS.RECIPE_DESC.BISHOP_NIGHTMARE = "Call forth the mighty bishop!"then have a newplacer.lua in \yourmod\scripts\prefabs\ with justrequire "prefabutil"return MakePlacer("common/newplacer", "bishop", "bishop_nightmare", "idle_loop" )The arguments for the placer in order are name, animation bank, animation build, animation cycle. See prefabutil.lua for the rest. Link to comment https://forums.kleientertainment.com/forums/topic/34343-help-dont-know-how-to-make-a-new-placer-for-an-existing-prefab/#findComment-446309 Share on other sites More sharing options...
Flypaste Posted April 6, 2014 Author Share Posted April 6, 2014 Thank you, that helped a lot. Link to comment https://forums.kleientertainment.com/forums/topic/34343-help-dont-know-how-to-make-a-new-placer-for-an-existing-prefab/#findComment-446329 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