Wow, yeah that probably would help wouldn't it? Here's the code for the whole function. It does loop through every suspect in the game already. First it checks if the suspect was alone, and if so picks a random alibi from a separate list, then if not, is supposed to pick a random alibi from the regular list. What I want is for the game to keep track of which alibis have been picked from the regular list so that if the same number comes up again, it gets re-rolled. This way, the suspects in the game won't ever have the same alibi text.
<function name="generate_alibi_strings">
chosen_alibi = NewStringList()
foreach (current_suspect, game.suspects_list) {
if (current_suspect.alibi_person = "alone") {
alibi_die = GetRandomInt(1,5)
switch (alibi_die) {
case (1) {
current_suspect.alibi = current_suspect.firstname+" turns to face you and whispers, \"I spent the entire evening alone in the "+current_suspect.alibi_room.alias+". I know that's not much of an alibi, but you must believe me when I say I had no reason to kill "+game.victim.firstname+". No reason at all.\""
}
case (2) {
current_suspect.alibi = current_suspect.firstname+" turns away from you and murmurs, \"I spent the entire evening alone in the "+current_suspect.alibi_room.alias+". And I'm afraid that nobody saw me. But I hope you're not so silly as to suspect me of the crime. Why, I hardly knew "+game.victim.firstname+", and I certainly had no reason to commit murder.\""
}
case (3) {
current_suspect.alibi = current_suspect.firstname+" replies haughtily, \"I spent the entire evening alone in the "+current_suspect.alibi_room.alias+". I suppose you assume that I killed "+game.victim.firstname+" just because I haven't an alibi, but I never cared one way or the other about that little manipulator. You'll just have to take my word.\""
}
case (4) {
current_suspect.alibi = current_suspect.firstname+" draws you closer and whispers, \"I spent the entire evening alone in the "+current_suspect.alibi_room.alias+". So, I guess I'm your prime suspect, inspector. But I think you're going to find that I didn't have any reason to murder "+game.victim.firstname+".\""
}
case (5) {
current_suspect.alibi = current_suspect.firstname+" replies distractedly, \"I spent the entire evening alone in the "+current_suspect.alibi_room.alias+". Now I suppose that looks bad for me, doesn't it? But you must believe that I could never have hurt anyone. And I certainly couldn't have killed "+game.victim.firstname+"... I just couldn't.\""
}
}
}
else {
alibi_die = ""
while (alibi_die = "" or ListContains(chosen_alibi, alibi_die)) {
alibi_die = GetRandomInt(1,10)
switch (alibi_die) {
case (1) {
current_suspect.alibi = current_suspect.firstname+" shrugs nonchalantly and says, \""+current_suspect.alibi_person.firstname+" and I spent the entire evening together in the "+current_suspect.alibi_room.alias+". You've got your work cut out for you on this one, inspector. None of us cared much for "+game.victim.firstname+", and that's the truth. Frankly, whoever did it deserves a medal.\""
list add (chosen_alibis, "1")
}
case (2) {
current_suspect.alibi = current_suspect.firstname+" replies haughtily, \"I spent the entire evening with "+current_suspect.alibi_person.firstname+" in the "+current_suspect.alibi_room.alias+". Of course we both despised "+game.victim.firstname+"--but then, so did everyone else in the house. Frankly, I think you should just leave well enough alone.\""
list add (chosen_alibis, "2")
}
case (3) {
current_suspect.alibi = current_suspect.firstname+" sneers wickedly and replies, \"I spent the entire evening with "+current_suspect.alibi_person.firstname+" in the "+current_suspect.alibi_room.alias+". And I simply cannot believe that anyone in this house would have had the bad taste to commit murder... Though I sometimes think that "+game.murderer.firstname+" is capable of almost anything.\""
list add (chosen_alibis, "3")
}
case (4) {
current_suspect.alibi = current_suspect.firstname+" shrugs nonchalantly and says, \""+current_suspect.alibi_person.firstname+" and I spent the entire evening together in the "+current_suspect.alibi_room.alias+". Far be it from me to meddle in your affairs, inspector, but I really think you should question "+game.murderer.firstname+". Why just the other day "+game.murderer.firstname+" told me that "+game.victim.firstname+" would be better off dead.\""
list add (chosen_alibis, "4")
}
case (5) {
current_suspect.alibi = current_suspect.firstname+" looks up from the floor and says, \"I spent the entire evening with "+current_suspect.alibi_person.firstname+" in the "+current_suspect.alibi_room.alias+". Why, I didn't even find out about "+game.victim.firstname+"'s death until right before you arrived. Isn't it awful. Who do you think could do such a thing!?!\""
list add (chosen_alibis, "5")
}
case (6) {
current_suspect.alibi = current_suspect.firstname+" forces a laugh and replies, \""+current_suspect.alibi_person.firstname+" and I spent the entire evening together in the "+current_suspect.alibi_room.alias+". Now just between you and me and the walls, inspector, I admired "+game.victim.firstname+" greatly. Wouldn't want the others to know about my little soft spot though.\""
list add (chosen_alibis, "6")
}
case (7) {
current_suspect.alibi = current_suspect.firstname+" turns away from you and murmurs, \"I spent the entire evening with "+current_suspect.alibi_person.firstname+" in the "+current_suspect.alibi_room.alias+".... I'm just so shocked by this whole affair. Murder is such an ugly business, don't you think? Of course I've heard that "+game.murderer.firstname+" doesn't share my opinion on that point...\""
list add (chosen_alibis, "7")
}
case (8) {
current_suspect.alibi = current_suspect.firstname+" laughs lightly and replies, \"I spent the entire evening with "+current_suspect.alibi_person.firstname+" in the "+current_suspect.alibi_room.alias+". Now... is that all you wanted to know? I really would like to go lie down if you don't mind. All of this murder business has given me a splitting headache.\""
list add (chosen_alibis, "8")
}
case (9) {
current_suspect.alibi = current_suspect.firstname+" replies in an angry voice, \"I spent the entire evening with "+current_suspect.alibi_person.firstname+" in the "+current_suspect.alibi_room.alias+". And I simply cannot believe that anyone in this house would have had the bad taste to commit murder.... Though I sometimes think that "+game.murderer.firstname+" is capable of almost anything.\""
list add (chosen_alibis, "9")
}
case (10) {
current_suspect.alibi = current_suspect.firstname+" raises an eyebrow and says, \""+current_suspect.alibi_person.firstname+" and I spent the entire evening together in the "+current_suspect.alibi_room.alias+". Actually, in my opinion, there's no one in this house with the intellectual capacity to commit murder and get away with it. Except for myself, of course. Too bad I have an alibi!\""
list add (chosen_alibis, "10")
}
}
}
}
}
</function>
Also, I should mention that I will be adding more alibis to that list eventually as well so it will become less of an issue, but I still want to have this implemented because even if there's 100 different alibis, there's still an alibi could be picked more than once.