NPC Dialog

0 favourites
  • 9 posts
From the Asset Store
Customizable speech bubble dialogue system! With this dialogue system, you can finally have speech bubbles in your game!
  • Hello All

    For 3 Days I�ve been working on a NPC conversation but I don�t know something went wrong. When the arrows are clicked I want the conversation between the player and NPC to continue. Could someone please take a look a my file and show me where I�m messing up.

    http://www.fileserve.com/file/WxYTkDM/Oyashima.caproj

  • The download isn't working; you saved it as a folder, but didn't give us the whole folder. <img src="smileys/smiley17.gif" border="0" align="middle" />

    The easiest thing to do is click "Save as a single file" and then upload that. Much less hassle for other people.

  • Sorry about that hopefully this works

    Oyashimasingle.capx

  • So first thing you're doing wrong : your file host ^^

    Really, prefer using dropbox, so that the users don't have 5 click and a captcha to answer, this is just bad.

    Then, you should use instances rather than showing/hiding your gui elements as you go by.

    For now you have three, but I bet you're aiming for "a big game" and you'll end up drown in thousands of such objects.

    Rather than Next, Next1, Next2, etc... use a single object and private instances to see where you're at.

    There are several dialog systems in the how do I FAQ

    dialog system with answers - LINK

    Visual Novel/Dialogues example - LINK

    I strongly suggest to check them out and find a way to implement/adapt them in your own game.

    It's not an easy task, but dialogs are a complex subject.

    Good luck <img src="smileys/smiley1.gif" border="0" align="middle">

    Edit: also I forgot, the current problem is because when you use the condition "click on Next" the click occurs when the mouse button is down.

    This makes the second sentence appear, but as you're still "clicking" for C2, it jumps to the third, and the next one...

    Checking the examples will allow you to wait for the user's action before displaying one sentence or another.

  • Okay, I fixed it. I also fixed, well... a lot of things. <img src="smileys/smiley36.gif" border="0" align="middle" />

    db.tt/UmBj3oH3

    I'll try to explain all the changes I made.

    The biggest problem with the dialogue system was that you were trying to create new objects for each part of the conversation, which wasn't necessary to do at all. It gets very messy trying to deal with all those objects, and the way I set it up is much simpler. Instead of having all of those conversation objects, there's a single one, simply named Conversation, with all of the different pictures set as frames of an animation. Normally, that means it would cycle through the pictures as an animation, but I also set the animation speed to 0, meaning it doesn't move; at that point, you use events to set the animation frame, switching between them as you want.

    In addition to the conversation pictures, you also tried to create different text objects for the actual words. Again, you only need one text object. For each part of the conversation, you can use the text object's "Set text" action to display the dialogue you want.

    Same goes for the "Next" and "Close" objects -- you only need one.

    To advance the conversation, I gave Next a private variable called "Convo". When Next is clicked, Convo is increased by 1. Based on the current value of Convo, you change the conversation picture and the text to be what you want it to be.

    Also, the thing mentioned before about putting all the pictures into an animation with a speed of 0 can be applied to things like the corpses, which I did for you. You won't have to have separate objects like Corpse1, Corpse2, and Corpse3; just one object called Corpse, with all three pictures in it. In the editor, you can click an object and set its initial frame under the "Properties" section.

    I'm not too good at explaining things, so don't hesitate to ask any questions if I confused you with all of this. <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Oh come on, Kyatric! <img src="smileys/smiley36.gif" border="0" align="middle" />

    Serves me right for not refreshing before posting this...

  • dialogStuff.capx

    But next time, please, use dropbox (:

    Damn I've been double ninja'd

  • Thank you for your help <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have learn something new here thanks

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