Got a slight scripting problem, in that I have no idea how to do this.
I need two script statements. I'll write what I need below, in pseudo-code:
1) GET how many enemies, out of all enemies present, have "Attack Element == 1"
2) GET how many actors, out of all actors present, have "Attack Element == 2"
Can someone clarify how to do these? I assume it's going to involve filtering to get an array, and then performing a check on the length of that array... but I'm not certain how to structure it in the syntax.
This is because for a battle scenario, I need to count how many "fire enemies" are onscreen, or "ice actors" for a given moment. Previously I was doing this by incrementing a variable by 1 each spawn, and decrementing it by 1 on-death - but that has resulted in problems that make me think a cleaner solution is preferable.
I have a few other questions relating to this, where I'm looking to replace some of my more torturous logic with this kind of stuff... But I'll start with this one. I might be able to work the others out once I have this.
I need two script statements. I'll write what I need below, in pseudo-code:
1) GET how many enemies, out of all enemies present, have "Attack Element == 1"
2) GET how many actors, out of all actors present, have "Attack Element == 2"
Can someone clarify how to do these? I assume it's going to involve filtering to get an array, and then performing a check on the length of that array... but I'm not certain how to structure it in the syntax.
This is because for a battle scenario, I need to count how many "fire enemies" are onscreen, or "ice actors" for a given moment. Previously I was doing this by incrementing a variable by 1 each spawn, and decrementing it by 1 on-death - but that has resulted in problems that make me think a cleaner solution is preferable.
I have a few other questions relating to this, where I'm looking to replace some of my more torturous logic with this kind of stuff... But I'll start with this one. I might be able to work the others out once I have this.