How do I

0 favourites
  • 3 posts
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hey Merlinus

    i dont know if this is the cause, but you can click objects, even if they are invisible.

    Make the condition like: 'On click on XY' and 'XY is visible'

  • ... You can?

    In all the time I've spent on this game this is the first time I clicked on an invisible object. Yes, I overlayed the text objects that don't appear simultaneously to save space. That must be it! Thanks a lot.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)