Lumina Posted July 16, 2017 Share Posted July 16, 2017 Hi again I want to spawn chest in the world when doing an action (digging something), and i want chest to contain some items, like treasures chest in shipwrecked. But i don't manage to understand what part of the SW code is useful for what i want and what part is here for others things. Code of SW code relevant as far as i understand : https://pastebin.com/U3cyWLyd https://pastebin.com/RZq4awue I inst.SetRandomTreasure = function(inst) inst:Reveal() local treasures = GetTreasureLootDefinitionTable() local treasure = GetRandomKey(treasures) inst.loot = treasure end This part seems to be about what i want (choosing one of the chest in the list of the second file. But i'm not sure of what i will need else. Also, maybe it's better to use another way ? I'm not sure scenario could work in this case.. Thanks for any help. Link to comment Share on other sites More sharing options...
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 account
Already have an account? Sign in here.Sign In Now