A Roblox Community

A community of Robloxians who want to learn to script and build on Roblox Studio.
 
HomeFAQRegisterLog in
If you're a experienced coder make some tutorials! It would really help the site grow.
Make sure you read the rules(Which can be found by clicking here)
If you're a beginner at coding, try some tutorials.
We have many Moderators/Admins watching this site. Contact them with Questions.
Let us know what your favorite sport is. By clicking here to vote (Click here)
This site is becoming inactive. Lets make it active.
Log in
Username:
Password:
Log in automatically: 
:: I forgot my password
Top posters
blueymaddog
 
naknak
 
Supernapalm
 
m27frogy
 
slayer9365
 
myrco919
 
branefreez
 
ninga95
 
CloneTrooper787
 
raboy117
 
Top posting users this month
Latest topics
» Send me an Email
January 8th 2016, 10:14 am by naknak

» [v1.6.0.0] Lua Script Obfuscator [No Bytecode]
July 6th 2015, 7:38 pm by m27frogy

» New Site Possibly
July 6th 2015, 4:16 pm by m27frogy

» Ambassador!
April 15th 2015, 11:40 pm by naknak

» Boop - Tag
April 13th 2015, 9:46 pm by naknak

» Vip Class Script
April 13th 2015, 4:54 pm by naknak

» Who's active?!
April 13th 2015, 4:52 pm by naknak

» Where to go from here.
April 13th 2015, 4:51 pm by naknak

» Genesis Point
July 17th 2014, 7:04 pm by branefreez

» Reward System
July 17th 2014, 5:41 am by m27frogy

» Script Request
July 10th 2014, 11:43 am by naknak

» local scripts?
July 10th 2014, 11:39 am by naknak

» Project: Reconstruction [Died]
July 10th 2014, 11:36 am by naknak

» Hi. I am new here
April 26th 2014, 4:01 pm by altshiftkey

» What's your favorite sport?
January 1st 2014, 2:13 pm by m27frogy

» FlashLight Script
January 1st 2014, 2:11 pm by m27frogy

» Gun Making! [READ DESC]
January 1st 2014, 2:10 pm by m27frogy

» Hi, I am new here!
November 26th 2013, 3:33 pm by Keanu73

» Improve Coding
October 26th 2013, 1:12 pm by pook03

» Simple Button
September 1st 2013, 6:19 pm by branefreez


Share | 
 

 Blueymaddog's Dialog NPC tutorial

Go down 
AuthorMessage
blueymaddog
Administrator
Administrator
avatar

Posts : 1081
Join date : 2010-12-09
Age : 19

PostSubject: Blueymaddog's Dialog NPC tutorial   December 9th 2010, 8:15 am

I've seen some people making threads on how to use dialog chat bubbles so I decided to make a tutorial!!!

Part 1: making that chat bubble appear above something!

select the part you want to talk in the explorer then insert a dialog into the part. Insert>Object>Dialog

Dialog properties:
ConversationDistance - how close you have to be to talk. Measured in studs.
InUse - true if NPC (non player character) is being talked to.
InitialPrompt - what the NPC first says when a player starts chatting to it.
Purpose - sets the icon in the dialog when NPC isn't chatting.
Tone - sets the color of the dialog

The rest are just global variables. Eg. Name, Parent, className...

Part 2: Choices!
If we just put a dialog that says one thing when you chat to it it wouldn't be that great. Why not make it more exciting by respond to what it says with a few options to choose from!

I will be introducing another instance type called DialogChoice.


Select the dialog and insert a DialogChoice instance. Insert>Object>DialogChoice

DialogChoice properties:
ResponseDialog - what the NPC says in reply to what the choice is.
UserDialog - the choice you see near the bottom-left of your screen.

The rest are global variables.

You can put more than 1 choice/reply within a dialog. And make choices inside choices!!!
1 last thing before I make a dialog shop example.
There is a special event for Dialog. It's .DialogChoiceSelected. It triggers when you click a choice. It's useful for quests and shops.

Part 3: Shop Example

Structure of the game:
-game
--Workspace
---Base - Part
---Part - Part
----Dialog - Dialog
-----Script - Script
-----Weapons - DialogChoice
------Sword - DialogChoice
--Lighting
---Sword - Tool

Script:
---------------------------------------
tool = game.Lighting.Sword:Clone() -- sword tool

function onDialogChoiceSelected(player, DialogChoice) --triggers when someone chooses a choice
if DialogChoice.Name == "Sword" then
tool:Clone().Parent = player.Backpack
end
end

script.Parent.DialogChoiceSelected:connect(onDialogChoiceSelected)

----------------------------------------
Rate and comment my tutorial!!!

-blueymaddog-
Back to top Go down
naknak
Administrator
Administrator
avatar

Posts : 878
Join date : 2010-07-30

PostSubject: Re: Blueymaddog's Dialog NPC tutorial   December 15th 2010, 6:45 pm

Nice. Did you write this?
Back to top Go down
blueymaddog
Administrator
Administrator
avatar

Posts : 1081
Join date : 2010-12-09
Age : 19

PostSubject: Re: Blueymaddog's Dialog NPC tutorial   December 18th 2010, 8:30 am

Yes, I made a thread on the Scripting Helpers forum on roblox of this tutorial and it had some errors in the tutorial so I posted the fixed version here.

_________________
blueymaddog
Administrator • Moderator • Expert Scripter
PM: blueymaddog
<+1 post. ujelly?>
Back to top Go down
Sponsored content




PostSubject: Re: Blueymaddog's Dialog NPC tutorial   

Back to top Go down
 
Blueymaddog's Dialog NPC tutorial
Back to top 
Page 1 of 1
 Similar topics
-
» Curl Tutorial!
» AOE_Fan's RMS Command Tutorial
» How to make .abk book ( Arena ) step by step... tutorial...
» i need help ;/
» IvanHoe 999946f x64 vs. IvanHoe B46fB x64, 2.800 games, still running

Permissions in this forum:You cannot reply to topics in this forum
A Roblox Community :: Tutorials and Resources :: Intermediate-
Jump to: