generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

How do I use DialogChoiceSelected?

Previous Thread :: Next Thread 
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
21 Jan 2012 05:07 PM
? I looked at the Wiki and there's no examples.

It's not easy being cheesy.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
21 Jan 2012 05:09 PM
Have you checked:

http://wiki.roblox.com/index.php/How_to_use_Dialog

?

† KMXD †
Report Abuse
1WOOF1 is not online. 1WOOF1
Joined: 03 May 2009
Total Posts: 20682
21 Jan 2012 05:09 PM
[ Content Deleted ]
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
21 Jan 2012 05:10 PM
From the wiki page I gave you:

workspace.Dialog.DialogChoiceSelected:connect(function(player,choice)
    if choice.Name == "No" then
        player.Character.Humanoid.Health= 0
    elseif choice.Name == "Yes" then
        player.Character.Humanoid.Health = 1000
    end
end)

† KMXD †
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
21 Jan 2012 05:19 PM
Ok, So when I did this it worked, but, I want it to choose a Choice from the Choices Dialog.

    me = script.Parent
    me:FindFirstChild("Dialog").DialogChoiceSelected:connect(function(player,choice)
    if choice.Name == "Choices" then
    player.Character:BreakJoints()
    elseif choice.Name == "5Kill" then
    m = Instance.new("Message",Workspace)
    m.Text = "4242"
    end end)

And if you don't understand me then look at this Dialog Model..

http://www.roblox.com/Dialog-item?id=70612871

It's not easy being cheesy.
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
21 Jan 2012 05:43 PM
Bump.

It's not easy being cheesy.
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
21 Jan 2012 06:26 PM
Bump.

It's not easy being cheesy.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
21 Jan 2012 06:30 PM
Oh, then just put the script in "Choices". Then change them to "1Kill" and "5Kill".
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
21 Jan 2012 06:31 PM
Dang, Why don't I think of these things?!?!??!

It's not easy being cheesy.
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
21 Jan 2012 06:45 PM
When I put it in the DialogChoice I get this output:

DialogChoiceSelected is not a valid member of DialogChoice

It's not easy being cheesy.
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
21 Jan 2012 07:55 PM
bump.

It's not easy being cheesy.
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
21 Jan 2012 09:20 PM
Bump.

It's not easy being cheesy.
Report Abuse
crazytomato4 is not online. crazytomato4
Joined: 09 Feb 2011
Total Posts: 1368
21 Jan 2012 09:22 PM
It's a member of Dialog, not DialogChoice. The event seems pretty straightforward to me, it's just like any other event. What's so confusing about it?
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
21 Jan 2012 09:23 PM
How did it work for your fist script, but not for this one.. May we see the script?

† KMXD †
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
21 Jan 2012 09:25 PM
    me = script.Parent
    me.DialogChoiceSelected:connect(function(player,choice)
    if choice.Name == "Accept" then
    gui = script:FindFirstChild("Swamp"):Clone()
    gui.Parent = player.PlayerGui
    end end)

It's not easy being cheesy.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
21 Jan 2012 09:28 PM
me = script.Parent
me:FindFirstChild("Dialog").DialogChoiceSelected:connect(function(player,choice)
if choice.Name == "Accept" then
gui = script:FindFirstChild("Swamp"):Clone()
gui.Parent = player.PlayerGui
end end)

† KMXD †
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
21 Jan 2012 09:33 PM
Didn't help.

It's not easy being cheesy.
Report Abuse
crazytomato4 is not online. crazytomato4
Joined: 09 Feb 2011
Total Posts: 1368
21 Jan 2012 09:35 PM
Did you read my post? By the output you gave, it's obvious that you put your script inside a DialogChoice, where it should be inside a Dialog.
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
21 Jan 2012 09:39 PM
Ik, but how do I make it were when you choose what Quest you want then it brings you what that quest means then if you click Accept then it will activate the script.

It's not easy being cheesy.
Report Abuse
crazytomato4 is not online. crazytomato4
Joined: 09 Feb 2011
Total Posts: 1368
21 Jan 2012 09:44 PM
You use an if statement inside the function. One of the arguments is the DialogChoice that was selected. Use it.
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
21 Jan 2012 09:47 PM
Oh Thanks.

It's not easy being cheesy.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image