Sarifynna Posted September 7, 2015 Share Posted September 7, 2015 So I have been working on this mod called Turfed! It's a custom turfs mod that adds new turfs to the game. I don't know exactly what I am doing (mostly copy/paste, trial and error) and I could use some help with it if anyone would be so kind. I have it working pretty well but I have a few issues: 1. I don't know how to keep the new carpets on top of other flooring. They go underneath the other flooring types. So I am having an issue understanding turf layering and could use advice on how to fix that. 2. I don't know how to change the sound when walking on my custom turf types. (Wood sound for wood etc) 3. I know the game has the turfs all in one file, would I be able to do that too, or do I have to stick to the multiple prefabs? If anyone would take a look and see if they can help me with the coding/how to understand it better I would really appreciate it. =) Thank you!! The mod:http://steamcommunity.com/sharedfiles/filedetails/?id=514078314 Link to comment Share on other sites More sharing options...
ZupaleX Posted September 9, 2015 Share Posted September 9, 2015 (edited) 1- You can use stuff.AnimState:SetLayer(LAYER_YOU_WANT)you will find the list of layers in constants.lua. I think you should use LAYER_WORLD_BACKGROUND?Then you can adjust the ordering with stuff.AnimState:SetOrder(number)If you want it to be on top of anything, I think that 5 should be enough (i never saw something which use a SetOrder above 3 but I may be wrong. 2- Well, there is a tutorial how to use FMOD on the DS forum, made by Cheerio. 3- You can put all your turfs in the same lua file. Let's say you have in your lua file two turfs with their constructor functionslocal function turf1fn()do your stuffsendlocal function turf2fn()do your other stuffsendthen just put more than one stuff in the returnreturn Prefab("whatever/turf1", turf1fn, assets, prefabs), Prefab("whatever/turf2", turf2fn, assets, prefabs) Edited September 9, 2015 by ZupaleX Link to comment Share on other sites More sharing options...
Sarifynna Posted September 12, 2015 Author Share Posted September 12, 2015 ok thanks ZupaleX I will try that. =) Sorry I didn't reply sooner, I work a lot. lol Link to comment Share on other sites More sharing options...
ZupaleX Posted September 12, 2015 Share Posted September 12, 2015 No issue! It's just that I kind of like your mod idea and saw you still posted you have issue with that on your modpage 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