Get your own free workspace
View
 

DialogInput

Page history last edited by Gamemaster 3 years, 11 months ago

 

DialogInput

Usage:

                DialogInput(Actor, Dialog, Option1, [Option2, ..., Option12])

Description:

The DialogInput offers the player a set of options, and returns which one they clicked. You may specify up to 12 options, although five or less is recommended for most purposes. The value returned is a number between 1 and 12.

Example:

                Function Main()
                        Player = Actor()
                        D = OpenDialog(Player, ContextActor(), "Blacksmith")
                                DialogOutput(Player, D, "Welcome to my shop! Which item do you require?", 255, 255, 255)
                                Result = DialogInput(Player, D, "A mace (40 gold)", "Nothing")
                                If (Result == 1)
                                        GiveItem(Player, "Razor mace", 1)
                                ElseIf (Result == 2)
                                        DialogOutput(Player, D, "Right you are, bye then!", 255, 255, 255)
                                        DialogInput(Player, D, "Bye")
                                        CloseDialog(Player, D)
                                        Return()
                                EndIf
                                DialogOutput(Player, D, "Thank you! Come back when you want something else...", 255, 255, 255)
                                DialogInput(Player, D, "Bye")
                        CloseDialog(Player, D)
                        Return()
                End Function

Comments (0)

You don't have permission to comment on this page.