Characters using other character's text
Hello. So, I am making a dialogue-based game in which several characters appear randomly. You can pick different responses to them and their text changes accordingly.
Now, all of them share the same text object for their dialogue. But, this text changes when you click other text objects (your own responses) which are only made visible based on specific triggers. None of these "responses" text objects are shared between multiple characters. Hence my problem: while one character is on screen sometimes, their dialogue turns to that of another character, even though the object that triggers this dialogue should be invisible.
Example (simplified as the original is in french and contains a bunch of objects unrelated to this question):
dialoguetime variable starts at 1 (I tied it to a text object for some stupid reason)
on Mouse object clicked on Character1:
if dialoguetime=1:>set DialogueText to "Thanks for the ride man"
>set dialoguetime to 2
>set "replynoproblemdude" visible
on mouse clicked on "replynoproblemdude":
if dialoguetime=3:>set DialogueText to "Hope I'm not bothering you"
>set dialoguetime to 4
if dialoguetime=2:>set DialogueText to "You're great man"
>set dialoguetime to 3
on Mouse object clicked on Character2:
if dialoguetime=1:>set DialogueText to "Hi take me to the store please"
>set dialoguetime to 2
>set "replyok" visible
on mouse clicked on "replyok":
if dialoguetime=3:>set DialogueText to "I gotta get there asap"
>set dialoguetime to 4
if dialoguetime=2:>set DialogueText to "Please hurry up"
>set dialoguetime to 3
So my problem is that sometimes when Character1 is on screen, DialogueText will be changed to "I gotta get there asap" for example, which shouldn't be possible as the "replyok" text object (which you have to click to trigger this response) is invisible.
I'm not sure how to format this better, plus maybe i should post this in beginners since I am one? I don't know but if you could help me out that would be great.