How to generate random amount of object and assign value to each of it

example is the game that can recruit random number of peasant but each have their own experience point, so after some point they can be upgraded to soldier. this is not a problem if say 5 person have same exp points but i dont know how with new recruit like 1 person have lower exp than the other 4

there isn’t anything special in this.
use the repeat (x times) event. inside this event:

  • first create the pleasant object to the given X, Y position,
  • set its Z order,
  • and than set its exp variable to Random() or RandomInRange()
  • do other actions if you need…
1 Like