Hi all, thanks for taking the time to read this, I'll try to make it as short as possible.
I'm working on a murder-mystery-esque game where someone new dies every night. I want the victim to be chosen by random from the possible characters, but with a percentage shift based on other factors (the idea is to allow the player the oppotunity to change the likely hood of someone dying).
Right now I've set up a preliminary code where I gather everyone's percentage chance to die.
First, I check if each character is already dead - in which case their chance is set to 0
Then I check if the player did something that would ensure their safety - in which case their chance is set to 0
If neither of these are true, then every character will start with a base of 10 for their likelyhood of dying.
But I want to influence that, as seen by their relationship level with the murderer (hidden from the player of course). If they have a bad relationship, it would add 10 to their chance. I will be adding other factors/variables/switches that would influence this as well.
What I'm having trouble with now is figuring out how to take those percentages and run an event that will choose the next victim. (I'll have a switch for who's chosen).
There are 9 possible victims each night, depending on how many are alive/safe. (there won't be any situations where everyone is at 0% chance)
Any ideas?
Thanks in advance!
I'm working on a murder-mystery-esque game where someone new dies every night. I want the victim to be chosen by random from the possible characters, but with a percentage shift based on other factors (the idea is to allow the player the oppotunity to change the likely hood of someone dying).
Right now I've set up a preliminary code where I gather everyone's percentage chance to die.
First, I check if each character is already dead - in which case their chance is set to 0
Then I check if the player did something that would ensure their safety - in which case their chance is set to 0
If neither of these are true, then every character will start with a base of 10 for their likelyhood of dying.
But I want to influence that, as seen by their relationship level with the murderer (hidden from the player of course). If they have a bad relationship, it would add 10 to their chance. I will be adding other factors/variables/switches that would influence this as well.
What I'm having trouble with now is figuring out how to take those percentages and run an event that will choose the next victim. (I'll have a switch for who's chosen).
There are 9 possible victims each night, depending on how many are alive/safe. (there won't be any situations where everyone is at 0% chance)
Any ideas?
Thanks in advance!