Let's say you have a project where there are a lot of Actors (Maybe 30 or more). I'd like to iterate through the cast at various stages to do things like check if any of them have a specific item equipped, or maybe randomly select one to be present in a scene. However, as far as I can tell, there's not a good way to do this through scripting in the editor, as you can't tie a variable to a position in the list of actors. Instead, you would need to manually code an if state that checks each actor one at a time, for example:
This becomes a pretty big statement to write out, especially if needed for multiple purposes, and then becomes a real issue if the actor list ever changes. What I would hope to be able to do would be more like:
I think I have the know-how to do this in Javascript, so this isn't really an impediment to my project, but I am curious if there's functionality in the editor than I'm missing. Are there any good solutions to consider? I'd love to hear thoughts.
This becomes a pretty big statement to write out, especially if needed for multiple purposes, and then becomes a real issue if the actor list ever changes. What I would hope to be able to do would be more like:
I think I have the know-how to do this in Javascript, so this isn't really an impediment to my project, but I am curious if there's functionality in the editor than I'm missing. Are there any good solutions to consider? I'd love to hear thoughts.