Twine Version: 2.7.1
Sugarcube2
Situation: Writing a ghost story where the ghost is going to manipulate the shittiest relationship available between 9 people, in order to make chaos. I need to figure out how to determine which relationship is lowest in order to do this.
I have 36 variables, one for each relationship between the 9 people. I need to figure out which variable has the lowest number, so that I can then have the system use that variable to pick a version of the conversation that applies tension for those two characters.
Code so far:
check spirit type
if good send [[Good]]
if neutral, send [[Neutral]]
Otherwise -
<<math.min ($R1_2, $R1_3, $R1_4, $R1_5, $R1_6, $R1_7, $R1_8, $R1_9, $R2_3, $R2_4, $R2_5, $R2_6, $R2_7, $R2_8, $R2_9, $R3_4, $R3_5, $R3_6, $R3_7, $R3_8, $R3_9, $R4_5, $R4_6, $R4_7, $R4_8, $R4_9, $R5_6, $R5_7, $R5_8, $R5_9, $R6_7, $R6_8, $R6_9, $R7_8, $R7_9, $R8_9)>>
/*$PC tells the system which character the player chose to play as.
<<set Medium =
/* Relationship values (Digits equal person) (0 = hatred, 50= friendship, 100 equals love)
<<set R1_2 = 65>>
<<set R1_3 = 45>>
<<set R1_4 = 55>>
<<set R1_5 = 65>>
<<set R1_6 = 35>>
<<set R1_7 = 65>>
<<set R1_8 = 80>>
<<set R1_9 = 75>>
<<set R2_3 = 45>>
<<set R2_4 = 60>>
<<set R2_5 = 35>>
<<set R2_6 = 60>>
<<set R2_7 = 40>>
<<set R2_8 = 45>>
<<set R2_9 = 65>>
<<set R3_4 = 55>>
<<set R3_5 = 70>>
<<set R3_6 = 50>>
<<set R3_7 = 40>>
<<set R3_8 = 50>>
<<set R3_9 = 45>>
<<set R4_5 = 65>>
<<set R4_6 = 60>>
<<set R4_7 = 75>>
<<set R4_8 = 75>>
<<set R4_9 = 75>>
<<set R5_6 = 45>>
<<set R5_7 = 40>>
<<set R5_8 = 50>>
<<set R5_9 = 40>>
<<set R6_7 = 65>>
<<set R6_8 = 65>>
<<set R6_9 = 75>>
<<set R7_8 = 80>>
<<set R7_9 = 60>>
<<set R8_9 = 55>>
<<set Blessings = "Neutral">>
<<set Divine_contacted = false>>
<<set WhichDivine = "">>
/*options are: Divine_good, Divine_bad, Divine_neutral
/*Spirit options:
<<set Spirit_contacted = 0>>
/*Options are: 0 - none, 1,2,3 - Good, 4,5,6 (died of natural causes) - Neutral, 7,8,9 - Evil (demon or vengeful spirit), 10 - Haunted (Murdered brutally)
<<set SpiritName = "">>
<<set SpiritDeath = 0>>
<<set SpiritFamily = 0>>
<<set SpiritAfterlife = 0>>
/*Make arrays for Names, Deaths (different arrays for types of spirits), Family and Afterlives.
Death types: Murder by stranger, Murder by family, Accidental Death, Drowning, Hanging (punishment), Illness, Starvation, Old Age,
<<set Guidance = 0>>
Any help or guidance that can be offered would be appreciated. All the options I’ve found so far have been about pulling the lowest number and not the lowest variable… and I can’t find anything indicating what I could alter in those codes to figure out what I need.