Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
1
Question by Ejpj123 · Jul 13, 2016 at 04:17 AM · 2drpgdialogue

RPG Dialogue?

Hi, I am making a 2D RPG, and I was wondering if anyone has a full-length script, or could make one for me, of dialogue somewhat like this:

https://www.youtube.com/watch?v=ncr8pWRpqo8

You can press X To skip the typing of the dialogue, and press Z to go to the next dialogue box. And Audio that you can choose, including the image.

And Sometimes you can choose a choice someone asks you, like this:

https://youtu.be/Q8W5sEOjGD8?t=207

And that would effect what the person says.

Any help would be very appreciated.

These videos are from the RPG game, Undertale, by the way, for any Undertale fans :)

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Mindmapfreak · Jul 13, 2016 at 06:24 AM 0
Share

What have you tried? Do you have any code?

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Bluestone19 · Jul 13, 2016 at 01:15 PM

I've made a dialog system in Visual Basic for a school project (which I've been meaning to re-create in unity), but here are the basics: 1. You need the dialog box UI (Probably just an image and text over it) 2. A static "Is Talking" variable to prevent the player from moving during text 3. a variable to hold the text (static too) 4. a custom function for starting/stopping dialog, which if the dialog doesn't have a "next" set of text, it hides the box and sets "Is Talking" to false. 5. (EDIT) you also should make it so if it's loading the same dialog, it advances in the dialog. You'll also need "dialog" and "Box" variables, both static as well.

If you would like me to try and roughly port over my game's code into C#, I can do that, although no guarantees it will intermesh into your game perfectly without manipulation. I recommend building it unique to your game because then you'll understand (for the most part) what each part does and how to modify it and fix it later, as well as the good learning benefit.

Comment
Add comment · Show 9 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Ejpj123 · Jul 13, 2016 at 01:47 PM 0
Share

@Bluestone19 Thank you so much and please do.

avatar image Ejpj123 · Jul 14, 2016 at 12:51 AM 0
Share

@Bluestone19 What I meant was sure, i'll see the script, even if there is mess-ups, I will fix them.

avatar image Bluestone19 Ejpj123 · Jul 14, 2016 at 02:14 AM 0
Share

Do you mean the VB script or a ported one? I don't have a unity-ready version, although I can make quick adjustments to the vb one to make it usable if modified.

avatar image Bluestone19 Bluestone19 · Jul 14, 2016 at 02:29 AM 0
Share
 Nessecary variables:
 Declare these!
 Talk - Bool
 TextOpt - Bool
 LargeOpt - Bool
 $$anonymous$$axOpt - Byte
 SelectedOpt - Byte
 Box - Byte
 TalkingTarget - Byte
 Text - String
 Restart - Bool
 
         if (Restart) { //If restarting
             Box = 0; //put the box to 0
         };
         DialogBox.Visible = True; //Shows the box (YOU WILL PROBABLY HAVE TO CHANGE)
         if (Talk = False Or Dialog <> CurrentDialog) { //If not continuing a dialog
             Talk = True; //Then start one
             Box = 0; //from the beginning
             CurrentDialog = Dialog; //and record what dialog is being started
         } ElseIf (Restart = False) { //Otherwise (if continuing)
             Box += 1 //Progress a box 
         };
         if (TextOpt = False) { //If it's not a choice,
             OptionBox.Visible = False; //Don't show the options.
         };
 
 //. . . Code to put the correct text into the “text” variable . . .
 //I don’t know how you want to do this, maybe from text resource file or a select case?
 //You mentioned audio. That would probably have to be controlled in this chunk too then, as well as anything that may change on a box-by-box basis.
 
         DialogBox.Text = Text; //Display the text!
         if (Talk = False) { //If no longer talking,
             txtDialog.Visible = False; //close the box
         };
         if (TextOpt = False) { //If there isn't a choice,
             txtOption.Visible = False; //Don't show the options
         };

This is some very rough code, that will in all likelihood won't work without some kind of tinkering. Hope this is somewhat what you're looking for, at least a sort of "skeleton" or framework for what you're looking for.

Show more comments
avatar image
0

Answer by BlockFade · Feb 06, 2017 at 05:42 PM

Im making a undertale battle engine for unity play it here: https://gamejolt.com/games/undertale-unity-battle-engine-demo/230707 I also have a unity asset pending review called TypeUnity!, it will have all of the features you require, including the ability to skip text(like undertale) and the ability to change which key to skip. VIdeos of Undertale Battle Engine for Unity: https://www.youtube.com/watch?v=oe7heAing2I

https://www.youtube.com/watch?v=mX4ADEpp0AA I'll post the link to the asset here when it's done.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image BlockFade · Feb 06, 2017 at 05:42 PM 0
Share

@ejpj123 I hope this post was helpful!

avatar image Ejpj123 · Jun 10, 2017 at 07:33 PM 0
Share

That is awesome @CreptthrustGames , I will wait for the asset to come out! I appreciate you for making this; I will definitely sub to your channel!

Best Regards, Ejpj123

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

90 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

2D player hides behind the room setting 2 Answers

Change Scenes Like Minit 1 Answer

How to fix the rotation bug? 1 Answer

8 direction movement with mouse 0 Answers

Issue with Sorting Layers with an NPC and Tilemap 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges