Go to a "random" state using ZScript?
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
-
3psilon
- Posts: 12
- Joined: Sat Mar 07, 2026 1:54 pm
- Operating System Version (Optional): Linux Mint 22.1 Cinnamon
- Graphics Processor: nVidia with Vulkan support
Go to a "random" state using ZScript?
I have a ZScript enemy, and I want it to be able to go to 1 state or another based on a 50/50 chance. How I'd like it to work, is it will go to a state called "Attack", where it will play an animation, then decide which state to go to, either "Flame" or "Gatling". How could I do this, if it's possible?
