NullCurrent
( ゚ε ゚)
- Reaction score
- 110
IF ANY MOD OR ADMIN FINDS THIS THREAD, DELETE IT, THERE IS BROKEN IMAGES THAT I CAN NOT GET BACK. THANK YOU.
Contents:
I. Background Information
II. Basic Dialog Box
III. Voting with Dialog Boxes
I. Background Information
Screenshot of a typical dialog box
II. Basic Dialog Box
This dialog box is the most basic one can get.
But, this is not going to do anything when you choose one.
So we go on to making a response.
[/list][/list][/list]
III. Voting with Dialog Boxes
I used the question "What would you rate my tutorial?" and I used 2 new variables.
Screenshot:
Hints:
-When making a long text use "|n" to break the line and bring it down one line.
-Keep your variables as simple names. This way it is easiest to refer back to them.
A Tutorial by Fabioz
Dialog Boxes in GUI
with voting
Dialog Boxes in GUI
with voting
Contents:
I. Background Information
A. What are dialog boxes?
B. Where is one usually used?
II. Basic Dialog Box
A. Creating the Variables
B. Creating the Dialog Box
C. Adding a Response
III. Voting with Dialog Boxes
A. Creating the Variables
B. Creating the Dialog Box
C. The Reaction
I. Background Information
What is a dialog box?
A dialog box is a box that comes up asking a question, or stating something. It also asks for a response.
Where is one usually used?
One is usually used when the computer is asking for a difficulty level, Mode style, etc.
Screenshot of a typical dialog box
II. Basic Dialog Box
This dialog box is the most basic one can get.
A. Creating the Variables
1. Open World Editor.
2. Go into the variable editor (little x button on top toolbar.)
3. The first variable is going to be the variable for the actual box. So, make a Dialog type variable called, "DialogBox".
2. Go into the variable editor (little x button on top toolbar.)
3. The first variable is going to be the variable for the actual box. So, make a Dialog type variable called, "DialogBox".
4. The second variable is going to be the variable for the buttons. There are going to be 2 buttons, so the variable is a dialog Button Type, called "DialogButton".
B. Creating the Dialog Box
Here you are going to create the trigger for the box, when, where, asking what, answers, all that.
1. My event is going to be 5 seconds has elapsed.
2. I will not have any conditions
3. My actions are going to be:
2. I will not have any conditions
3. My actions are going to be:
- Clear the dialog box, "DialogBox".(This is if you are using the dialog box more than once; its a good habit to get into)
- Change the title to what ever you want it to be named.
- Create a dialog button named what ever you want it to say.
- Create a dialog button named what ever you want it to say.
But, this is not going to do anything when you choose one.
So we go on to making a response.
C. Adding a Response
Here is where you will use a new variable, and add some triggers on to the first one.
1. Create a variable called “DialogButtons", with the type of Dialog Button, and an array of 2. (looks like this "DialogButtons[1]" etc.)
2. Create new triggers for the trigger "Basic Dialog Box"
Add the triggers right after you create the new dialog button. Set the Newly created dialog button equal to "DialogButton[1] or [2]. ([1]=Yes, [2]= No)
Add the triggers right after you create the new dialog button. Set the Newly created dialog button equal to "DialogButton[1] or [2]. ([1]=Yes, [2]= No)
It should look like this:
3. Create 2 new Triggers:
Yes:
- Event: Dialog button clicked.
- Condition: Dialog button clicked equals dialog button "DialogButton[1]"
- Trigger: Show Text: I am glad you think so!
Like this:
No: Should look almost the same but different array and different text, like this:
III. Voting with Dialog Boxes
I used the question "What would you rate my tutorial?" and I used 2 new variables.
A. Two new variables:
1. "VoteDialogButton" Dialog Button type, with an array of 5.
2. "Votes" Integer type, with an array of 5(to keep track of the votes).
B. Creating the Dialog Box
The voting dialog box is simular to the basic one, but, there are a lot more dialog buttons.
Since, you already know how to do it, I will just show the screenshot.
Since, you already know how to do it, I will just show the screenshot.
C. The Reaction
1. We will also need to make ten more triggers(for the five ratings, and the five responses.)
They will all look mostly the same:
They will all look mostly the same:
- Event: Dialog Button clicked
- Condition: Dialog Button clicked = VoteDialogButton[1-5]
- Action: Set VoteDialogButton[1-5] = VoteDialogButton[1-5] + 1
2. We will now create the trigger to specify wich rating won.
All of them will more or less look like this:
- Event: 15 seconds have elasped
- Conditions: VoteDialogButton[1] is greater than VoteDialog Button[2]-[5]
- Action: The vote of "1" won! (you can place many different actions than this though, like a mode style, etc.)
You will have to change each one, EXP: Votes[2] is greater than Votes[1], [3]-[5], etc.
Screenshot:
There you have it!
Questions? Comments? Please Post!
Questions? Comments? Please Post!
Hints:
-When making a long text use "|n" to break the line and bring it down one line.
-Keep your variables as simple names. This way it is easiest to refer back to them.