Download

Managing different values of variables of same class/get instance id of actor infront

Let’s say I am making a game that has hundreds of soldiers. Each soldier has a damage value but they aren’t all the same. How would I:

  1. Dynamically change the damage value of each of them specifically (i.e. give them a different weapon)?
  2. How would I send the damage value to the instance of the class directly in front of it so that I can subtract it from its health and deal damage to it without affecting the other soldiers?