Create objects with random size

Basically I want to create a certain amount of objects of the same type at the beginning of the scene, with some variation in size.

However, it seems I’m only able to create them only with their original scale, twice the scale, and so on, with something like this:

Do=Random(2) to the scale of <object> (in this case objects will be either in original size or twice the size.

Is there any way I can get more control? For example, doing Random(1.8) seems to only give me the original size on all instances of the object.

Yes, Random is only returning integers ( so you just get 1 here ).

To get numbers with a decimal part just do for example : Random(1000)/1000. It will return decimal numbers between 0.0 and 1.0.
If you need to get some decimal numbers between 0.5 and 1.5, you can do 1+Random(1000)/1000.

You can get more precision by changing the both 1000 to 10000 or less precision by using 100 or 10.

Thanks, that helps a lot. What if I wanted to have random position as well as size. It’s easy to get random values from 0 to , but in my case I’m allowing the avatar to move beyond 0 on the negative scale (I’m sure there is a better way of explaining that, but it was the best I could think of right now :slight_smile:).

Basically I want the object to be created anywhere between for example x: -2000 and 2000, y: -2000 and 2000. I know Random(x) gives you anything from 0 to x.

I thought something like this on both x and y could work, but it looks like this only gives me values between 0 and -2000 if I’m not mistaken:

Random(2000)-2000

Random(4000)-2000 :slight_smile:

Damn, that was close :slight_smile:

It seems like the debris in my galaxy is not spread out evenly as I hoped it would be. I create a LOT of objects at the beginning of the scene (probably not a good idea, but it’s the best I have found so far), and I was hoping to spread them around in all directions. However, it looks like they are only created in “negative” directions, -x and -y, if that makes sense.

I tried to zoom out a lot just to show where the objects are (only on the layer the objects are created)

[attachment=2]Debugging.png[/attachment]

Here are the events:

[attachment=1]Screenshot_2.png[/attachment]

Where I want the objects to be created:

[attachment=0]Debugging2.png[/attachment]