Get your own free workspace
View
 

CloseDialog

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

 

CloseDialog

Usage:

                CloseDialog(Actor, Dialog)

Description:

The CloseDialog command closes a dialog window. The Dialog parameter should be a valid dialog handle returned from OpenDialog().

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.