Creating multiple instances of an object with random values in them

Hi guys. Ever since I started with Gdevelop I have been struggling with the following problem. I can’t seem to find a way of creating multiple instances of the same object which only once upon their creation will be given a random variable value in them (that could be changed later on in the game). Is there any way? Thanks

Simply create an Object variable after creating the instance.

You have to change the variable on the action of the object that is created to specify it to that object.


On the other hand, the random value as it is programmed is that it will choose a random value between 1 and 10, but you can adapt it to your values. In this way, for each object that you create in the given action, it will be assigned a random object variable value in the range of 1 to 10 (integer values). The object variable can be changed with another action later.
Is this what you are asking?

I know how to make it for just one instance. But what if I want to create numerous instances?
For example, every 5 seconds, I would like to create 5 instances of the object enemy. Upon them being created, I want every single one of those instances to have a randomly assigned instance value.


Perhaps if you explain the objective better, a simpler or more specific way can be found to help you. Instances of an object are based on its name and names are not created randomly.

Create only one instance per event and repeat the event immediately 5 times.