It all comes down to variables and calling them when your ready to end your game.
Make multiple events that have dialog and choices that raise your "relationship level", and when you reach a specific relationship level, you add a self switch to that character event.
Do this a few times based on how far you want to go, and when you reach whatever level you need to get a specific ending, you save it as a global variable (If relationship level on Steve = 2: end1 = 1/true). Or you can write it as (If Selfswitch Steve A, B, and C (relationship 3) is true, end1 = 1/true).
Then just make a event thats based on calling all of the variables you collected throughout the game, and have whatever endings you want!
Thats something you probably have in your program, now you just need to call the specific ending you want right?
You need to call every specific variable, and then have a shut off just in case to prevent multiple endings from happening at the same time. If you do it correctly, you really dont need the shut off part, but its something you should test in your game to see if it works.
I think you should do something like this; Im using "ending 2" as an example, with three different endings.
In the perfect world, this is how your final statement should look:
Variables: end1= false, end2 = true, end3 = false, shutoff = false
(If end1 = false, end2 = true, end3 = false, shutoff = false)
(Final ending 2 plays.)
shutoff = true
end
Result: Final ending 2 plays, no repeated events
But somewhere in your code, this would probably happen since its possible to make relationships with all of your characters:
Both end1 and end2 are true, rest are false
(If end1 = false, end2 = true, end3 = false, shutoff = false)
(Final ending 2 plays.)
shutoff = true
end
Result: Final ending 2 does not play, but if other events are true, you can play another final event IF the conditions are correct.
So there's two fixes to this current fix, in order to run things smoothly (sorry for making it complicated)
1: Prioritize a ending you would rather have in your program, (ending 3 over ending 1 and 2, if 3 is true). You would have to do a checker statement before the final event plays, and make it where you make your end1 and end2 false, and then the final choice event plays.
In this example, the order you would want your ending to play in, is 3, 2, and 1.
If 1 and 3 are true, 3 plays over 1.
(If end3 = true)
end1 = false
end2 = false
(If end2 = true, end3 = false)
end 1 = false
end
(Final event from above plays)
2: Make a new event and situation, where the player needs to manually choose one person in the end. This way, the player has input on what kind of ending they want, and ontop of a smooth fix your problem.
Make sure you dont replace this with your current code, but write a new one. Since you said if one player only does one relationship, it works.
(if end 1 and end 2 = true, OR end 2 and end 3 = true, OR end 1 and end 3 = true)
"What should i do? Who should i pick?
(If end1 = true)
Choice 1
end2 = false
end3 = false
(If end2 = true)
Choice 2
end1 = false
end3 = false
(If end3 = true)
Choice 3
end 1 = false
end 2 = false
end
(Final event from above plays)
Whatever the result of the player is, you turn off, or make all other endings false, and then you transition into your final event ending.
(Player chooses ending 1 over ending 3, turn off all other endings before final event ending plays.)
You'll have to play around with the logic with the program, but im sure something like this can be done with alittle bit of testing!
I hope this helps! Frank