Is it possible to create random numbers with specific exclusions? I'm trying to make a very simple dungeon crawler, and I need a script for the enemies to target random party members. But I need to set it up so they don't have the option to target party members who are already at 0 HP. Is there a simple solution that I am missing? Sorry if I'm not phrasing things correctly or not giving enough information, this is my first time trying to learn any programming language.
How does your targeting method work in the first place? Is each character assigned a number? Are you using an array?