Spawn random object with nodes

How would you spawn a random object with nodes. I saw the object array node(which I have no clue what it does). I tried to make a combination of the object array node and the spawn object node ,but I have no clue how to code it to make it work and spawn randomly. If somebody is good at making logic nodes this would be useful.

Something kinda like this

I don’t think an extra node is necessary for this:

EDIT: The 4 in the “Random (Integer)” has to be a 3.

I’ll test that setup and see how it works. I wish there was more documentation on the logic nodes. Does color have to match? I see you’re plugging in a green to blue.

Green is used for lots of different kinds of Values, already opened an issue about it here. Usually if the output says “Value” it is a Dynamic Variable, so it has adapted to which kind of variable it has been fed with. But you are right, in most cases the colors should match.

Don’t forget to plug Length to Max!