How to set an unique number for the same actor
FirstDan
Member Posts: 208
Hi all
I have a single actor that I'm spawning 6 times by the following
Logic.
If actor count < 7 spawn actor
How can I set an count to uniquely identify these actors for eg. Actor 1 =1, actor 2 =2
Is this possible without unlocking the actors?
Much appreciated
Dan
I have a single actor that I'm spawning 6 times by the following
Logic.
If actor count < 7 spawn actor
How can I set an count to uniquely identify these actors for eg. Actor 1 =1, actor 2 =2
Is this possible without unlocking the actors?
Much appreciated
Dan
Comments
EXAMPLE: In this example 5 bad guys have been spawned. A 6th is about to be spawned NOW...
In the actor, a rule would say something like, From beginning of spawn, if actorcount is 5 then change attribute "self identity" to 6. (Self identity is an attribute I would have created-perhaps in integer).
I haven't tested this logic and there's a solid chance it may not work, but that's kind of the angle I'd be testing out.
Another possible direction I would go in, is to simply make 7 actors and give them unique identities. When they die or whatever, don't destroy them, simply put them off screen and wait to be respawn later.
So that may be another way of doing it too. Recycling actors is also a good idea for RAM consumption and performance.
Hope this helps.
Again, new here, so don't take my word for it.
that will give them each their own number
@anatomyofdreams - thanks also for your thoughts