Using statistique to create profile of element

Hello,

I’am scare to build my game in a wrong way because i don’t know the best way of doing it. So if you know a better way to do the following don’t hesitate.

I want an “object” to be 50 times create on the screen at random place.
The “object” will have different syze and different moving patterns.

Do you think it’s better to create 9 differents object with each a different syze and moving pattern. And after create a random to choose in the different group and place them at random.

Or having one object and make it random about syze, position and movement?

Considering that sometimes I want to make object movre briefly in a strange way.

Why would you bother creating 9 objects if you can achieve the same goal with only one? :man_shrugging:

PS: I have no idea what your title means.

1 Like

Like Gruk infers above, you should likely just use a single Object. Set a variable like “type” on the object when you create it, and then use your code to check the “type” of the object and manipulate it. You can develop as many types and associated algorithms, but still use the same basic code to loop through all of those objects without have to create a group.

1 Like

I will go for 9 objects, because it seems it’s hard to give the same behavior twice to an object.
I want many times the same behavior movement but with differents values.
There is an arror message.

It seems it will be more complicated to desactivate and activate all behaviors and we can’t give twice the same behavior to an object with different values.

Then you’ll need 9 objects indeed :slight_smile: