Is there a way to have an emitter emit a random object from a pre-selected inventory of items?
I would like to design a chest of some sort, the model itself doesn't really matter. But I would like for it to be "searched" one time, and for it to add an item to the players inventory (once I get that all figured out haha). I would like for the item to be randomized each time so it's not the same item each time. Is there anyway to do this with the emitter or is that a separate gadget or piece of logic. Thanks!
-
I'm think of a randomiser hooked up to a selector of all the different items.
-
If it's a manageable subset of items to choose from, how about a collection of emitters and randomly fire one of them?
-
I've experimented with this. There doesn't seem to be a way to set the object of an emitter with logic, it has to be done manually.
You will have to set up a series of emitters coupled to either randomizers or selectors for this. -
I found if you add all the items you want to randomise to a group, then use a randomiser to power them (linking individual items power to each of the randomiser outputs).
This worked great for me. There might be a better way though, as I only had 7 items to deal with - it would become very tedious if you had a lot of items. -
More generally, I wish Dreams supported the idea of "sets" or collections of objects, e.g. something that collected all objects meeting certain criteria then let me connect that set to an object port (a 'crosshair' port) and feed objects to the port randomly, in-order, or according to some other sorts of tweaks.
See https://feedback.indreams.me/forums/917434-dreams-how-do-i/suggestions/36714175-how-do-i-build-and-work-with-sets-of-objects
Please sign in to leave a comment.