Search the forums for "dialogs" What you want is a dialog, which is a custom UI basically. You can have a button that, when clicked, will fire a trigger for you.
So I have an array of records. Currently the records contain int, text, image. I have a record for each unit type. I want to reference these, let's say image when I create a dialog image. So it would be like:
Create dialog image for dialog with dimensions x, y anchored to bottom left, with offset x, y setting the tooltip to "Text" using the image Record[?].Image, etc. etc.
My question is the "?" part. I want to be able to pick which record, and thus which image, based on Unit Type. I could create a massive switch function to return the array position based on the Unit Type with something like:
Switch based on Unit Type
Case(Probe)
Return 0
Case(Zealot)
Return 1
This is possible but seams like a lot of code and therefore I am looking to see if there is another way to do this.
I am working with a custom UI and a lot of settings that won't be in the galaxy editor. I'm not sure if there is a built in function like a database to be able to store attributes for a given ID. For example, I want to reference a unit type and given attributes about it. Currently I can create an array indexed by unit type but I can only store one variable at a time. This leads me to have to replicate the arrays for each type of variable I want to store, then cross reference them in a complicated fashion. What this system comes down to is a relational database with each table being two columns with many rows, the first column being the ID and the second column being the attribute.
Basically, I want to be able to create a database within the galaxy editor. This data is not user specific, nor will it be modified.
Hmmm, sounds a lot easier. I'll give it a try and see how it goes. I know each player will have a dialog menu with list boxes they will be modifying separately. And showing/hiding their dialog throughout the game.
So I got this error. I am not sure why though. I know what an array is and I am trying to use them to create dialogs for players so their dialog selections are unique to themselves. As in when a player clicks a dialog button it doesn't click it for everyone.
Can you explain that a little more for me? Maybe a code snippet. It sounds like what I might need but I'm not sure how to implement that programmatically.
What I plan on having is a unit list. However you must unlock some of the units, so they don't all appear in the list at the same time. Furthermore, you can unlock units in different orders, so while one persons list may read:
Probe
Zealot
Stalker
another might read:
Probe
Stalker
Zealot
I need a way though to always be able to associate the selected list item with the correct unit.
I am trying to reference selected dialog list items. I know you can reference a list item by its index within the list, however I want to know if I can reference the selected list item by its name. For example, if the list read something like:
Probe
Zealot
Stalker
If I select Zealot I can reference the selection by the 2nd item in the list. I would like to reference it by its string name of "Zealot". This would allow me to add list items in a different order dynamically but still reference the correct selection for the appropriate action.
@Mienk: Go
I just hope that Blizzard changes their lets-not-tell-them-about-the-editor-fixes policy and actually releases a changelog with their changes instead of letting use figure them out.
Please Please Please learn how to use the search function. This is the most commonly asked questions on this board along with how to make a DotA like map. Search function!
Edit: Not only that, you didn't even read the sub forum description. This is not the correct place to post this!
0
I haven't found how to use data tables, where would I begin?
0
Search the forums for "dialogs" What you want is a dialog, which is a custom UI basically. You can have a button that, when clicked, will fire a trigger for you.
0
So I have an array of records. Currently the records contain int, text, image. I have a record for each unit type. I want to reference these, let's say image when I create a dialog image. So it would be like:
Create dialog image for dialog with dimensions x, y anchored to bottom left, with offset x, y setting the tooltip to "Text" using the image Record[?].Image, etc. etc.
My question is the "?" part. I want to be able to pick which record, and thus which image, based on Unit Type. I could create a massive switch function to return the array position based on the Unit Type with something like:
Switch based on Unit Type Case(Probe) Return 0 Case(Zealot) Return 1
This is possible but seams like a lot of code and therefore I am looking to see if there is another way to do this.
0
I am working with a custom UI and a lot of settings that won't be in the galaxy editor. I'm not sure if there is a built in function like a database to be able to store attributes for a given ID. For example, I want to reference a unit type and given attributes about it. Currently I can create an array indexed by unit type but I can only store one variable at a time. This leads me to have to replicate the arrays for each type of variable I want to store, then cross reference them in a complicated fashion. What this system comes down to is a relational database with each table being two columns with many rows, the first column being the ID and the second column being the attribute.
Basically, I want to be able to create a database within the galaxy editor. This data is not user specific, nor will it be modified.
Example:
Unit_Type String_Var Int_Var
Immortal Text 5,000
0
@Kafoso: Go
Hmmm, sounds a lot easier. I'll give it a try and see how it goes. I know each player will have a dialog menu with list boxes they will be modifying separately. And showing/hiding their dialog throughout the game.
0
So I got this error. I am not sure why though. I know what an array is and I am trying to use them to create dialogs for players so their dialog selections are unique to themselves. As in when a player clicks a dialog button it doesn't click it for everyone.
0
I don't mean to sound stupid, I'm just not following 100% on what you are saying. Any chance you could provide a code sample or example?
0
@Helral: Go
Can you explain that a little more for me? Maybe a code snippet. It sounds like what I might need but I'm not sure how to implement that programmatically.
What I plan on having is a unit list. However you must unlock some of the units, so they don't all appear in the list at the same time. Furthermore, you can unlock units in different orders, so while one persons list may read:
Probe Zealot Stalker
another might read:
Probe Stalker Zealot
I need a way though to always be able to associate the selected list item with the correct unit.
0
I am trying to reference selected dialog list items. I know you can reference a list item by its index within the list, however I want to know if I can reference the selected list item by its name. For example, if the list read something like:
Probe Zealot Stalker
If I select Zealot I can reference the selection by the 2nd item in the list. I would like to reference it by its string name of "Zealot". This would allow me to add list items in a different order dynamically but still reference the correct selection for the appropriate action.
0
@KerenskyLI: Go
Eh, ones a video and the link you posted isn't as informative or as easy to follow for people who are new to the editor.
0
This.
0
@jerberson12: Go
Follow that one which I posted. Where I used the region I selected the function "Entire Map" You may also select a value.
0
@ST4RKiLL3R: Go
This is bad, sec I will find my original post about this.
Edit: http://forums.sc2mapster.com/development/map-development/8681-trigger-return-total-unit-count-of-player/
0
Not to take away from this, but also check out:
0
Please Please Please learn how to use the search function. This is the most commonly asked questions on this board along with how to make a DotA like map. Search function!
Edit: Not only that, you didn't even read the sub forum description. This is not the correct place to post this!