How do I progress dialuge using the operator ?:

1 favourites
From the Asset Store
Progress\Loading Bar. Now Load you game like a Professional.
  • On the back and end conditions you are setting inchat to 0 twice, one of those should be a chatpos variable. That might cause it. Yes on my example open up the 'on touched NPC' event you will see it has sub events.

    Oh I see it. OK I changed it. The text is still invisible though.

    And I took another look in the project you sent, is it this? I still cannot see a subevent.

  • You have to press the arrow on the left to open the event block. If you see the arrows it is a sign that there are sub events below but the block was closed.

  • You have to press the arrow on the left to open the event block. If you see the arrows it is a sign that there are sub events below but the block was closed.

    Ooooh dang, I'm so sorry I didn't notice that. Ya I knew what arrows were for though.

    I tried out the "Lise Object" and this seems to actually work out easier for me so there won't have to be 4 text objects. Each item in the list is attached to an Array so I can get complex lines of dialuge. But you remeber the Tokenat expresstion you showed me in the beginning? I'm trying to put that into the action but idk how to write it.

    I know this is the code

    tokenat(NPC.dialogue,NPC.variable,"_")

    And I wanna have a tokenat in each parameter of the Array. Do ya know if I can do that? So far I am only able to write this much......

    Set Text to--->

    Array.At(0,GlobalVariable_number)

    I wanna put a tokenat in this

  • You replace NPC.dialogue with array.at(0,global_number), the first element in the tokenat() is the text you want to use.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You replace NPC.dialogue with array.at(0,global_number), the first element in the tokenat() is the text you want to use.

    Oh, I'm confused with that last part. I wrote array.at(0,global_number) but were does the tokenat go? May I see a screenshot?

  • I don't understand the question because I didn't use your list object. Try and understand my example, see if you can relate it to the list.

  • I don't understand the question because I didn't use your list object. Try and understand my example, see if you can relate it to the list.

    Oh ya I know you didn't use a list object. I was saying I decided to use a list object instead to see if it worked better for me and it did. So I was asking a diffrent question regarding that. I would like to but a Tokenat INSIDE an array so in each element in the array I can write several lines of dialuge instead of 1 line per element.

    Like at

    0,0 Hello, welcome to the adventure field_ you'll need a sword and shild_ and a map to help you navigate_ good luck

    0,1 ah I see you returned safely_now you see how dangerous the path is_ a word form the wise^ always take left turns

    0,2 you are stronger then you let on to be_ not many have made it this far_ you may be the choosen one our village has been hoping for.

    ----> Choice i.e (list object)

    1.thanks nice talking to ya

    2. The chooses one?

    3. It was difficult,you got healing items?

    4. We're is the next path?

    -----On choice 1 tapped

    Exit dialuege

    -----on choice 2 tapped

    1,0 yes you see there was a prophecy about you_you were born with special powers_lemme tell ya about it.

    1,1 but first let's go get some coffee_ its early in the morning and I'm beat_ at the shop I'll tell you all you need to know.

    1,2 OK thanks I appreaciate it_ I cup of coffee would do me good_ I've gotta loosen up.

    -And so forth-

    Thinking of it like a book. I want each element in the Array to be like a paragraph or a small chapter and the whole Array to be a Book if that makes sense. I don't want to only be able to put 1 sentence in each but still tap a button inside one element several times and get several lines of dialuge then when a choice is made I forward to the next element or exit out.

  • My example has several lines in one cell like how you described. For tokenat you just need the text so that will be the array position. Work out how you are changing the array position, array.at(x,y) is what you need. In my example I pull the row from an instance variable on the NPC. I don't see why that would be different.

    tokenat(text,index,separator) is what you need. The index to move across the string is the chatpos variable. The separator is the underscore. You should have all you need really. For choices I hardcoded it to certain rows, so you can do that with list item, if list item 1 is picked then use this row of the array, i.e. set a variable to that row for array.at(var).

    Look at how I change the Y variable based on text object clicked, you would do that with list item instead, that's probably the only change from my example. If you don't want to set it on the NPC (I was doing this to track it better for bugs), you set the dialogue directly in the list object instead of the NPC.

  • My example has several lines in one cell like how you described. For tokenat you just need the text so that will be the array position. Work out how you are changing the array position, array.at(x,y) is what you need. In my example I pull the row from an instance variable on the NPC. I don't see why that would be different.

    tokenat(text,index,separator) is what you need. The index to move across the string is the chatpos variable. The separator is the underscore. You should have all you need really. For choices I hardcoded it to certain rows, so you can do that with list item, if list item 1 is picked then use this row of the array, i.e. set a variable to that row for array.at(var).

    Look at how I change the Y variable based on text object clicked, you would do that with list item instead, that's probably the only change from my example. If you don't want to set it on the NPC (I was doing this to track it better for bugs), you set the dialogue directly in the list object instead of the NPC.

    ok,i got it to work. thanks so much the help^^

  • great! :)

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