km1102 Posted June 7, 2016 Share Posted June 7, 2016 As mentioned, i want to make mod for character that can only "eat" blue gems, but i don't know how to distinguish them. Link to comment https://forums.kleientertainment.com/forums/topic/67979-how-to-define-type-of-gem/ Share on other sites More sharing options...
whismerhill Posted June 7, 2016 Share Posted June 7, 2016 (edited) if item.prefab == "bluegem" then ... item being your passed object argument (could be inst or whatever...) see : http://dont-starve-game.wikia.com/wiki/Console/Prefab_List for a prefab list you could also have a look at wx78 LUA file Edited June 7, 2016 by whismerhill Link to comment https://forums.kleientertainment.com/forums/topic/67979-how-to-define-type-of-gem/#findComment-780778 Share on other sites More sharing options...
km1102 Posted June 7, 2016 Author Share Posted June 7, 2016 (edited) Ok i will check this, thank you. And i checked wx LUA and only "food type gears". Edited June 7, 2016 by km1102 Link to comment https://forums.kleientertainment.com/forums/topic/67979-how-to-define-type-of-gem/#findComment-780780 Share on other sites More sharing options...
whismerhill Posted June 7, 2016 Share Posted June 7, 2016 (edited) 36 minutes ago, km1102 said: only "food type gears". you do realize that sentence doesn't make any sense ? at least for me a non-english native reader. Either way it should work the same, except food type will be bluegem . Edited June 7, 2016 by whismerhill Link to comment https://forums.kleientertainment.com/forums/topic/67979-how-to-define-type-of-gem/#findComment-780795 Share on other sites More sharing options...
km1102 Posted June 7, 2016 Author Share Posted June 7, 2016 Ok checked this and sadly still crashes. Link to comment https://forums.kleientertainment.com/forums/topic/67979-how-to-define-type-of-gem/#findComment-780797 Share on other sites More sharing options...
whismerhill Posted June 8, 2016 Share Posted June 8, 2016 (edited) Sadly, you do realize you're providing no way to help us help you ??? no error message, no code, no exact explanation of what, where, how, when it crashes. I can't see how I can help in any way here. good luck Edited June 8, 2016 by whismerhill Link to comment https://forums.kleientertainment.com/forums/topic/67979-how-to-define-type-of-gem/#findComment-780800 Share on other sites More sharing options...
km1102 Posted June 8, 2016 Author Share Posted June 8, 2016 (edited) if food.components.edible.foodtype == FOODTYPE.GEM and item.prefab == ("bluegem") then And yes im using existing mod to just get started. Edited June 8, 2016 by km1102 Link to comment https://forums.kleientertainment.com/forums/topic/67979-how-to-define-type-of-gem/#findComment-780804 Share on other sites More sharing options...
whismerhill Posted June 8, 2016 Share Posted June 8, 2016 (edited) hum... how to say this .... as I said earlier "item" can be anything it has to be the variable that contains the bluegem ... maybe in this case the variable is "food" instead of "item", I can't be sure.... so it will be food.prefab ... maybe ... whatever it is, it's not item, as there's no "item" declaration before xD.... Edited June 8, 2016 by whismerhill Link to comment https://forums.kleientertainment.com/forums/topic/67979-how-to-define-type-of-gem/#findComment-780915 Share on other sites More sharing options...
km1102 Posted June 8, 2016 Author Share Posted June 8, 2016 food.prefab == ("bluegem") You got this, now it work perfectly thanks. Link to comment https://forums.kleientertainment.com/forums/topic/67979-how-to-define-type-of-gem/#findComment-780977 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