Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
Hello, I am trying to make a train station in my map. I would like to have a pop up that has 3 buttons on what station to choose to go to. How could I do that?
Hi there. What your talking about is a dialog box, and it is relatively easy to create with just a few simple triggers. First you need a trigger to set it up, which is best done when elapsed game time is 1 second or whatever, like so:
Set up dialog
Events
Time - Elapsed game time is 1.00 seconds
Conditions
Actions
Dialog - Clear StationDialog
Dialog - Change the title of StationDialog to What station do you...
Dialog - Create a dialog button for StationDialog labelled Station 1
Set Station1Button = (Last created dialog Button)
Dialog - Create a dialog button for StationDialog labelled Station 2
Set Station2Button = (Last created dialog Button)
Dialog - Create a dialog button for StationDialog labelled Station 3
Set Station3Button = (Last created dialog Button)
Dialog - Hide StationDialog for Player 1 (Red)
StationDialog is a Dialog variable, and it just helps identify that specific dialog if you have more than one dialog in your map. You still use it even if you have only the one dialog.
StationDialogButton is just a Dialog Button variable and helps identify which button is being pressed when acting on a Dialog Button is pressed event.
Next you need a simple event which will display the dialog when a unit enters a station or whatever, this event can be whatever you want, I used a simple region enter though:
Player triggers dialog
Events
Unit - A unit enters Station Platform <gen>
Conditions
Actions
Set TrainPassenger = (Entering unit)
Dialog - Show StationDialog for Player 1 (Red)
TrainPassenger is simply a unit variable which is set to the unit which activates the dialog, this just makes is easy to identify which unit is to be carried in the train later on.
Finally you need an event which will recognise when a player clicks on a button and is choosing a station, then send the hero or whatever unit to that station:
Choose station 1
Events
Dialog - A dialog button is clicked for StationDialog
Conditions
(Clicked dialog button) Equal to Station1Button
Actions
Dialog - Hide StationDialog for Player 1 (Red)
-------- Now add all your own actions such as moving units to different stations --------
-------- For example: --------
Unit - Move TrainPassenger instantly to (Center of Station 1 <gen>)
Camera - Pan camera for Player 1 (Red) to (Center of Station 1 <gen>) over 0.00 seconds
Hope this helps you out! Let me know if you need any more help
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.