Greetings. I probably should be asking this question on ZDoom forums, but I decided to try my luck here first. I'm working on a mod where at some point, a script should select a random actor that would be replaced by a newly spawned actor. Currently, I do have a similar function that replaces a monster that is targeted by a player (using SetActivatorToTarget) - but I wish for the new script to keep trying to select a new Actor until one of a specific kind (Pinky, Imp, or Lost Soul) has been selected. Sadly, I don't believe there is an ACS function to select a random Actor nor a random Actor of a kind.
Is there a viable way to achieve this? I would like the newly spawned Actor to be a surprise for a player, rather than being spawned right in front of them (I guess I could also have them spawn in place of an existing monster, have them be tied in Parent/Child relationship and become visible/regain bounding after a few seconds - but that feels incredibly hacky, even for Doom).
Bonus question: Is there a way to set Actor's Maximum health? Currently, I modify player's health using cloned UpgradeStamina object. However, I wish to be able to reduce player's maximum health as well.
Question
gufu
Greetings. I probably should be asking this question on ZDoom forums, but I decided to try my luck here first. I'm working on a mod where at some point, a script should select a random actor that would be replaced by a newly spawned actor. Currently, I do have a similar function that replaces a monster that is targeted by a player (using SetActivatorToTarget) - but I wish for the new script to keep trying to select a new Actor until one of a specific kind (Pinky, Imp, or Lost Soul) has been selected. Sadly, I don't believe there is an ACS function to select a random Actor nor a random Actor of a kind.
Is there a viable way to achieve this? I would like the newly spawned Actor to be a surprise for a player, rather than being spawned right in front of them (I guess I could also have them spawn in place of an existing monster, have them be tied in Parent/Child relationship and become visible/regain bounding after a few seconds - but that feels incredibly hacky, even for Doom).
Bonus question: Is there a way to set Actor's Maximum health? Currently, I modify player's health using cloned UpgradeStamina object. However, I wish to be able to reduce player's maximum health as well.
Share this post
Link to post
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.