I'd like to create a timed Race Selection setup for my map, but I'm not entirely certain how to do it. I have a pretty basic understanding of dialogs, timers and triggers in general, so while I'm not completely lost I'm also having difficulty doing this on my own (attempted twice, no dice).
What i have in mind
It would have a timer to show how much time you have left to select a race, have portrait and text dialogs for each race and a "Select" button for each race.
To select your race, you click one of the buttons at the bottom, then when the timer expires the building/units for your race are created at a start location.
Picture/Example:
A step-by-step tutorial would help me the most here, but if you don't feel like making one, then pointing me in the right direction would help too :)
how far have you come yet? create a new dialog, anchor it mid, hide the background. create a new dialog item label with text race selection. add a new dialog item label with text 60. save it in a variable called timer. so on so on.
have a periodic time event that triggers every second. each second you lower the timer by 1. you might save the time in a var. if the var is 0 you do whatever you want to do after the timeout.
it's all just dialogs, there are plenty of tutorials. i recommend the one with nice borders but first of all set them up.
Alright, i got the big rectangular dialog box to show up, got the 7 pictures to show up with a bit of room between them (took me awhile to get the scaling right), got the labels beneath the pictures to say what i wanted them to and got the buttons at the bottom to spawn the desired units at the desired start locations. I also got it to hide when one of the buttons is pressed.
Unfortunately, i couldn't figure out how to make the timer show up in its box nor how to make the spawning be delayed until the timer expires. Presumably I'd have to store peoples selections in variables, then have the spawning happen at the expiration of the timer based on what the stored values are for each player, but i don't know how to set that up in the trigger editor :S
Also, i wanted to sorta show what race is currently selected by putting a border around the button at the bottom that you currently have selected, but I'm completely lost as to how to do that.
Think you have time to make me an example map? Er, completely understand if you don't by the way, just wondering. It'd really speed this up for me if i had something to look at first-hand.
send you pm with my map Rites of Shakuras, i think i did exactly what you want to have. maybe like one of my posts or i loose my 1 to 10 post reputation ratio
Unfortunately, i couldn't figure out how to make the timer show up in its box nor how to make the spawning be delayed until the timer expires. Presumably I'd have to store peoples selections in variables, then have the spawning happen at the expiration of the timer based on what the stored values are for each player, but i don't know how to set that up in the trigger editor :S
The timer would be better done in its own thread via a regular text label and loop instead of the premade timer one. Just modify a timer variable every second or so and update the label. Have the buttons of course just set a variable for the players choice; then check when the timer hits zero where you would spawn based on the players choice variable. I would recommend just a while loop in an action definition.
Just so your aware dialog items are done on a per player basis. Actions defintions too help alot in dialogs by making "templates" when creating similar layouts such as each rac's column.
I'd like to create a timed Race Selection setup for my map, but I'm not entirely certain how to do it. I have a pretty basic understanding of dialogs, timers and triggers in general, so while I'm not completely lost I'm also having difficulty doing this on my own (attempted twice, no dice).
What i have in mind
It would have a timer to show how much time you have left to select a race, have portrait and text dialogs for each race and a "Select" button for each race.
To select your race, you click one of the buttons at the bottom, then when the timer expires the building/units for your race are created at a start location.
Picture/Example:
A step-by-step tutorial would help me the most here, but if you don't feel like making one, then pointing me in the right direction would help too :)
@Enigmapfhor: Go
how far have you come yet? create a new dialog, anchor it mid, hide the background. create a new dialog item label with text race selection. add a new dialog item label with text 60. save it in a variable called timer. so on so on. have a periodic time event that triggers every second. each second you lower the timer by 1. you might save the time in a var. if the var is 0 you do whatever you want to do after the timeout.
it's all just dialogs, there are plenty of tutorials. i recommend the one with nice borders but first of all set them up.
Alright, i got the big rectangular dialog box to show up, got the 7 pictures to show up with a bit of room between them (took me awhile to get the scaling right), got the labels beneath the pictures to say what i wanted them to and got the buttons at the bottom to spawn the desired units at the desired start locations. I also got it to hide when one of the buttons is pressed.
Unfortunately, i couldn't figure out how to make the timer show up in its box nor how to make the spawning be delayed until the timer expires. Presumably I'd have to store peoples selections in variables, then have the spawning happen at the expiration of the timer based on what the stored values are for each player, but i don't know how to set that up in the trigger editor :S
Also, i wanted to sorta show what race is currently selected by putting a border around the button at the bottom that you currently have selected, but I'm completely lost as to how to do that.
Think you have time to make me an example map? Er, completely understand if you don't by the way, just wondering. It'd really speed this up for me if i had something to look at first-hand.
@Enigmapfhor: Go
send you pm with my map Rites of Shakuras, i think i did exactly what you want to have. maybe like one of my posts or i loose my 1 to 10 post reputation ratio
The timer would be better done in its own thread via a regular text label and loop instead of the premade timer one. Just modify a timer variable every second or so and update the label. Have the buttons of course just set a variable for the players choice; then check when the timer hits zero where you would spawn based on the players choice variable. I would recommend just a while loop in an action definition.
Just so your aware dialog items are done on a per player basis. Actions defintions too help alot in dialogs by making "templates" when creating similar layouts such as each rac's column.