bnutters Posted July 4, 2021 Share Posted July 4, 2021 I'm making a prefab that grows and is harvestable like grass tufts, and everything is working well but I'm having trouble having a different set of examination quotes when the prefab is picked. Link to comment Share on other sites More sharing options...
Monti18 Posted July 5, 2021 Share Posted July 5, 2021 So is this grass that you can be picked at different growing stages and for these you need different examination quotes? Or do you want multiple possible quotes that can be said when the prefab is picked? Or do you want different quotes for different characters? 1 Link to comment Share on other sites More sharing options...
bnutters Posted July 5, 2021 Author Share Posted July 5, 2021 6 hours ago, Monti18 said: So is this grass that you can be picked at different growing stages and for these you need different examination quotes? Or do you want multiple possible quotes that can be said when the prefab is picked? Or do you want different quotes for different characters? Multiple possible quotes that can be said when the prefab is picked. Link to comment Share on other sites More sharing options...
Monti18 Posted July 5, 2021 Share Posted July 5, 2021 I think you can use SetDescription of the component inspectable. local string = {"string1","string2","string3"} local function description() return string[math.random(#string)] end --master postinit inst.components.inspectable:SetDescription(description) Add this to your item prefab. I think something like this should return a random string of the table string each time you inspect it. Try if it works. 1 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