Spawning actors in a sequence and assigning them each an ID

GamersRejoiceGamersRejoice Member Posts: 817
edited November -1 in Working with GS (Mac)
Like the title says, I'm trying to spawn 18 actors in a specific order while assigning each one a unique ID number. So the ID numbers would be 1,2,3,4... etc.

What would be the best way to do this? Any help is appreciated.

Comments

  • RedlerTechRedlerTech Member Posts: 1,583
    Create an attribute inside the actor saying "actor name" Id
  • GamersRejoiceGamersRejoice Member Posts: 817
    I guess I should mention that I am only spawning 4 different actors but multiples of each of these. So 8 of 1 actor, 6 of another actor etc.
  • MagoNicolasMagoNicolas Member, PRO Posts: 2,090
    You Have a Self if (Or Game Id for each numbers of actors you want)
    And When you Spawn one Change Spawn id to a Game Attribute that is 0, then add 0 +1.
    Next time you spawn other one you gave him the new id 1, and +1 to that attribute, and soon on..

    Cheers.
  • GamersRejoiceGamersRejoice Member Posts: 817
    Cool, I will try this. Thanks!
Sign In or Register to comment.