Spawn 5 Actors and Give Each Actor a Unique Number Between 1-5
Hi All,
I have 5 actors, and each has an internal/unique attribute called 'myNumber'.
What I want to do is:
When these 5 actors are spawned, change the internal/unique attribute of each actor to a unique number between 1-5. if another actor has the same number then change it to another straight away.
Basically I want to assign a unique number to each spawning actor within a range.
Thanks,
I have 5 actors, and each has an internal/unique attribute called 'myNumber'.
What I want to do is:
When these 5 actors are spawned, change the internal/unique attribute of each actor to a unique number between 1-5. if another actor has the same number then change it to another straight away.
Basically I want to assign a unique number to each spawning actor within a range.
Thanks,
Comments
Thanks for this. Can you PM me anything you find please (if you can PM in this, I have never looked to use it before)??
On your spawner, have it randomly assign a number to a global attribute called tableRow. Then spawn your 5 actors.
in each actor have a rule that reads from one column of a table on row tableRow
And in your table, randomly prefill the tables with the information
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
same for tags
gameAttribute … index type … spawnCount
before each spawn on the spawner
changeAttribute: game.spawnCount To: game.spawnCount+1
on each spawnedActor 1st behavior
changeAttribute: whatever you want to change To: game.SpawnCount
@};- MH
"You would have to have it linked to a game attribute as there is no way of one actor communicating with another actors internal attributes."
Just unlock the actor when it's in the scene and you can access all the attributes of all the other actors.