- Joined
- Mar 10, 2021
- Messages
- 15
Hello everyone! My first post, I should have joined a long time ago.
I'm presently making test maps just to try out whatever come to my mind.
Now I'm working on a tavern where a unit gets in and can buy drinks or have a chat with the tavernkeeper.
One of the ways I'm trying to do this is using dialogs, after testing my hand with Orc_Tamer's basic dialog tutorial (which works perfectly, as expected). Trouble is, mine don't work and I don't understand why. I used the same method and my first part (dialog box and buttons) works fine, but I can't get the buttons to work.
So first I made my variables:
TavernDialog, Dialog type
TavernButtons, Dialog button type, array of 7
Then I made my dialog:
I made a variable so the target of the "drinks" will be targeted at the unit in the tavern region
Unit, Unit type
With the corresponding trigger:
I'm presently making test maps just to try out whatever come to my mind.
Now I'm working on a tavern where a unit gets in and can buy drinks or have a chat with the tavernkeeper.
One of the ways I'm trying to do this is using dialogs, after testing my hand with Orc_Tamer's basic dialog tutorial (which works perfectly, as expected). Trouble is, mine don't work and I don't understand why. I used the same method and my first part (dialog box and buttons) works fine, but I can't get the buttons to work.
So first I made my variables:
TavernDialog, Dialog type
TavernButtons, Dialog button type, array of 7
Then I made my dialog:
-
Tavern 2 dialog
-
Events
- Unit - A unit enters Tavern 2 <gen>
- Conditions
-
Actions
- Dialog - Clear TavernDialog
- Dialog - Change the title of TavernDialog to Howdy! What can I serve you?
- Dialog - Create a dialog button for TavernDialog labelled A Fortifying Ale (50 gold)
- Set DialogButton[1] = (Last created dialog Button)
- Dialog - Create a dialog button for TavernDialog labelled I think I'll pass, thank you
- Set DialogButton[7] = (Last created dialog Button)
- Dialog - Show TavernDialog for Player 1 (Red)
-
Events
I made a variable so the target of the "drinks" will be targeted at the unit in the tavern region
Unit, Unit type
With the corresponding trigger:
-
Set unit
-
Events
- Unit - A unit enters Tavern 2 <gen>
- Conditions
-
Actions
- Set Unit = (Entering unit)
-
Events
-
Fortifying Ale
-
Events
- Dialog - A dialog button is clicked for TavernDialog
-
Conditions
- (Clicked dialog button) Equal to TavernButtons[1]
-
Actions
- Player - Add -50 to Player 1 (Red) Current gold
- Unit - Set life of Unit to 100.00%
- Game - Display to Player Group - Player 1 (Red) the text: There you go, friend.
-
Events
-
Pass
-
Events
- Dialog - A dialog button is clicked for TavernDialog
-
Conditions
- (Clicked dialog button) Equal to TavernButtons[7]
-
Actions
- Game - Display to Player Group - Player 1 (Red) the text: (You leave)
-
Events
Last edited: