Let's say I have 20 npcs in the ColorFaction. They all have the possibility to choose a color. If a npc have one color it can't have another one too. And if a color is in use by one npc it cannot be chosen by another npc.
There are about 20 colors too. Each color has it's own dialogue topic. Each color has it's own CheckerRef objectreference too.
Right now each of these topics have the conditions [Subject.GetFactionRank(ColorFaction) == 0] and [ColorCheckerRef.GetDisabled() == 1], the ColorCheckerRef depending on which color it is. The RedColorTopic's CheckerRef is called RedCheckerRef and so on.
And then each topic has a script fragment. As an example we use the RedColorTopic again:
akSpeaker.SetFactionRank(ColorFaction, 1)akSpeaker.SetOutfit(RedOutfit)RedCheckerRef.Enable()
Every one of the 20 colortopics should work like this.
So we could set the npc "Ron Weasley" to the color red and another npc "Gandalf" to white and so on.
After this we have another topic that doesn't work like all the others. This topic is supposed to remove the npc's color no matter which color it is, and make this color a possibility again for every colorless npc.
Right now this topic has the condition [Subject.GetFactionRank(ColorFaction) == 1]. It has a script fragment saying:
akSpeaker.SetFactionRank(ColorFaction, 0)akSpeaker.SetOutfit(ColorlessOutfit);a last function that will disable the npc's colorcheckerref is missing here
If this should work properly Ron Weasley and Gandalf should be able to remove their color. Weasley should then be able to become white and Gandalf should be able to become red. Without the last function the colors red and white could never be used again when they have been used one time. THAT is my problem!
What could I do instead?