• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Menu

Status
Not open for further replies.
Level 3
Joined
Feb 2, 2006
Messages
24
I didn't know where else to post this since I can create topics in Tutorials. I wanna know how you make a menu appear with different selectable options, like on Kings and Castles. I have looked and looked through triggers and it still puzzles me. :?
 
Level 2
Joined
Mar 15, 2006
Messages
31
Dialog options? That would be under dialog... first create a Dialog variable for the actual dialog, and then create variables for your dialog buttons (one for each). Then, in the actual triggers, show your dialog (the first variable you made), then give it a title, and then give it the dialog buttons (the other variables you made). Then create a trigger for each dialog button (it's easiest that way), and for the event, choose A Dialog Button is Pressed. Then, under conditions, choose which dialog button, and then tell the game what to do when the button is pressed.

This might be easier to visualize, so:

Trigger One - Dialog Creation:

Events:
(Here is where you tell the dialog when to appear, so for this example, it will be when the unit is selected.)

Unit - A Unit is Selected

Conditions:
(This is where you specify something - so for our example, we are going to specify the unit that is being selected. Note that it is not always necessary to have a condition, because some events, such as Time - Time Elasped and Map Initialization dont need specifications - they're generalities.)

Event Response - Triggering Unit equal to Arthas 0000 (the number specifies when the unit was created - so if it was the first unit, it would be 0000, while if it was the second, it would be 0001. When you select a unit, the unit number will be given automatically, so you generally don't need to worry about this.)

Actions:
(This is the tricky part. This is where you tell the game what to do if the event comes to pass. This is how you create the dialog.)

Dialog - Show Dialog1 (When you select Show/Hide dialog, you'll need to create a variable. To do this, when you click on the word Dialog in red text, click Edit Variables. From there, click the New Variable button, type in a name (for this example, it's Dialog1), and select a Variable type. You want to select Dialog, not any of the others (not Dialog Button, either.)

Dialog - Change Title of Dialog1 to Orders: (to choose the dialog variable you created, when you click on the red text, it should be in the dropdown menu to the left of the Edit Variables button (you are setting the name of the Dialog here, the text in yellow that appears at the top of the Dialog when it appears.)

Dialog - Create a Dialog Button for Dialog1 labelled Move to Base (this is creating the clickable options that appear when the Dialog opens. You'll need to create a Variable for each of these Dialog Buttons. Do so by clicking the now familiar Edit Variables button, and create a new Variable. However, the type of the Variable is now Dialog Button - not Dialog. You need at least two Dialog Buttons for the Dialog to work correctly. You can have up to 16 Dialog Buttons. You aren't assigning the Variable to the Dialog Button in this action - that will be done in the next action).

Variable - Set DialogButton1 = Last Created Dialog Button (DialogButton1 is the name of the Dialog Button Variable we created).

Dialog - Create a Dialog Button for Dialog1 labelled Close Dialog (here I'm just creating my second Dialog Button so that the Dialog will work correctly).

Variable - Set DialogButton2 = Last Created Dialog Button


Now for the Dialog Button triggers. You need one of these for each Dialog Button you created.

Events:

Dialog - A Dialog Button is Clicked for Dialog1

Conditions:

Clicked Dialog Button equal to DialogButton1 (the Variable for the Dialog Button).

Actions:

Hide Dialog1 (you'll want to hide your Dialog, or else the Dialog will stay on the player's screen).

Unit - Order Arthas 0000 to move to Region 0000 (here you will tell the game what to do - for this example, we're telling the unit to move back to his base, where Region 0000 is located).


Now for the trigger for the other Dialog Button.

Events:

Dialog - A Dialog Button is Clicked for Dialog1

Conditions:

Clicked Dialog Button equal to DialogButton2

Actions:

Hide Dialog1 (this is all this Dialog Button will do, since it was labelled Close Dialog in the first trigger).


And that's all there is to it. Hope this helps.
 
Status
Not open for further replies.
Top