In this very long tutorial I cover all the steps from the idea stage to the fully functional scrolling listbox that I have shown off previously. I also go through Presets & Records again and I take the list concept one step further to show you how easy it is to extend on this and make more advanced lists.
Now this tutorial is not so much about the actual thing we create but more about the concepts I cover. I will teach you how to make a scrolling list, which is a concept you can use for so many things. I also teach more about presets and records, plus quite a lot about code organization and how to write good UI code. So even if the list might not be something you want to use, you still might want to watch the tutorial as there is probably a lot you can learn from it if you are not an experienced programmer.
Part 1: Planning (1 Video)
I go through some basics of planning your code and why it is important to plan your code.
Part 2: Data Setup (3 Videos)
In this part I set up the data storage for our map, I also cover Presets & Records in greater detail as well as good coding structure.
Part 3: Creating The Dialog (8 Videos)
In this part I create the actual dialog, I cover some clever ways of storing data from your dialog, how to select items and make the dialog scroll. Also how to handle button callback and more.
Finally I finish this off by modifying my list from not only being shown on the UI but also showing off units ingame. This concept can be used to create more advanced unit selection dialogs.
As far as I know, the first index of an array is either 0 or 1 depending on what the entries are for that array. I have plenty of arrays that begin at 1.
Even if you begin entering your data at entry number 1 in the array SC2 will allocate memory for the 0th element of the array. You could start entering data from element 100 and up but SC2 would still allocate memory for element 0-99. Which is why it is referred to as a zero index array.
Yeah I suppose, just wanted to give people a heads up on this. Only annoying part is that if they don't fix this at release and then suddenly decide to fix it in some random patch a lot of maps will probably break.
So I recently added a pulldown to my ui and figured I could simply use it by looping through my array and adding all the elements, then I could read the selected index and use that to access my array... WRONG!
Here are some things you should know about pulldowns:
Unlike arrays they are not zero indexed, the first index is 1
The first item you add to the list will appear first in the list, any item added after that will appear in reverse order in the remaining list.... wtf?!?
So what this means is that if you have a zero indexed array with an element in the 0th element to create a working list you need to,
Add element zero to the list.
Loop through the remaining elements in your array in reverse order and add them to the list box.
The reason a local doesn't work is because local variables get deleted after each run of the trigger. So the next time you come into the trigger the local variable is reset to the default value. So whenever you want to store something between trigger runs you need to put it into a global variable.
Just double click on one of the items in the list in your screen shot and the window from the tutorial should open up.
Also this should not go in the tutorial forum as a new thread, rather in Map Development or as a reply to the original tutorial. Going to move this thread.
In this tutorial I go over how to customize your tile sets so you can mix textures, cliffs and backgrounds from different tile sets. I also cover how to make moving water/lava like blizzard has showed off in one of their campaign maps.
0
make your own leaderboard, then you get full control over it. It's basically just a list dialog so it's not that hard to make one.
0
In this very long tutorial I cover all the steps from the idea stage to the fully functional scrolling listbox that I have shown off previously. I also go through Presets & Records again and I take the list concept one step further to show you how easy it is to extend on this and make more advanced lists.
Now this tutorial is not so much about the actual thing we create but more about the concepts I cover. I will teach you how to make a scrolling list, which is a concept you can use for so many things. I also teach more about presets and records, plus quite a lot about code organization and how to write good UI code. So even if the list might not be something you want to use, you still might want to watch the tutorial as there is probably a lot you can learn from it if you are not an experienced programmer.
Part 1: Planning (1 Video)
I go through some basics of planning your code and why it is important to plan your code.
Part 2: Data Setup (3 Videos)
In this part I set up the data storage for our map, I also cover Presets & Records in greater detail as well as good coding structure.
Part 3: Creating The Dialog (8 Videos)
In this part I create the actual dialog, I cover some clever ways of storing data from your dialog, how to select items and make the dialog scroll. Also how to handle button callback and more.
Map Download For Part 3:
http://dl.dropbox.com/u/1586398/Tutorials/Advanced%20Triggers/ScrollingListBoxTutorial.SC2Map
Part 4: A Different Type Of List (2 Videos)
Finally I finish this off by modifying my list from not only being shown on the UI but also showing off units ingame. This concept can be used to create more advanced unit selection dialogs.
Map Download For Part 4:
http://dl.dropbox.com/u/1586398/Tutorials/Advanced%20Triggers/ScrollingListBoxTutorial-Extended.SC2Map
You can find even more video tutorials if you check out my youtube channel
0
Even if you begin entering your data at entry number 1 in the array SC2 will allocate memory for the 0th element of the array. You could start entering data from element 100 and up but SC2 would still allocate memory for element 0-99. Which is why it is referred to as a zero index array.
0
@apasseroni0014: Go
Yeah I suppose, just wanted to give people a heads up on this. Only annoying part is that if they don't fix this at release and then suddenly decide to fix it in some random patch a lot of maps will probably break.
0
So I recently added a pulldown to my ui and figured I could simply use it by looping through my array and adding all the elements, then I could read the selected index and use that to access my array... WRONG!
Here are some things you should know about pulldowns:
So what this means is that if you have a zero indexed array with an element in the 0th element to create a working list you need to,
Here is my code that I use for my map,
0
In this tutorial I cover the basics of debugging your triggers. I see a lot of people struggle with this so I decided to make a tutorial about it.
Map Download: http://dl.dropbox.com/u/1586398/Tutorials/Basic%20Triggers/Debugging.SC2Map
You can find even more video tutorials if you check out my youtube channel
0
moving to map development
0
moving this thread to map development
0
Neat tutorial.
The reason a local doesn't work is because local variables get deleted after each run of the trigger. So the next time you come into the trigger the local variable is reset to the default value. So whenever you want to store something between trigger runs you need to put it into a global variable.
0
Just double click on one of the items in the list in your screen shot and the window from the tutorial should open up.
Also this should not go in the tutorial forum as a new thread, rather in Map Development or as a reply to the original tutorial. Going to move this thread.
0
@ErrorAsh: Go
0
In this tutorial I go over how to customize your tile sets so you can mix textures, cliffs and backgrounds from different tile sets. I also cover how to make moving water/lava like blizzard has showed off in one of their campaign maps.
Map Download: http://dl.dropbox.com/u/1586398/Tutorials/TerrainEditing/TileSetsAndWaterStates-Tutorial.SC2Map
You can find even more video tutorials if you check out my youtube channel
0
In this tutorial I cover four requests from the http://www.sc2mapster.com forum.
Map Download:
http://dl.dropbox.com/u/1586398/Tutorials/DataEditor/SC2Mapster-Requests-01.SC2Map
You can find even more video tutorials if you check out my youtube channel
0
In this tutorial I go through how to set up a computer player that will create units from their production buildings periodically through the game.
I boosted my sound by 150% in this tutorial due to complaints about my sound being too low, please let me know if you think this is better.
The map I created can be downloaded here, http://dl.dropbox.com/u/1586398/Tutorials/UnitCreation/ComputerCreate-Tutorial.SC2Map
You can find even more video tutorials if you check out my youtube channel
0
In this tutorial I cover how you can use Presets and Records to organize your triggers better.
You can find even more video tutorials if you check out my youtube channel