Thanks for your replay and sorry about the wrong section.
For triggering:
I tried this one already. It is too slow. There is a short, barely visible moment the trigger needs to be triggered. If one clicks during this exact moment, the 1st index unit from the selected unit group will be set as the one i want to be set instead the unit that was clicked.
So there is really no way to disable it in the Data Editor? Because for example enemy units can't be selected that way. The question is, where that is achieved.
Edit: Ok, in my case, there is an other way, I could probably solve the problem, though I can't find the right condition for that. What I need is to check if the unit is commandable. Is there something I've overseen?
is there a way to prevent same type selection? The selection by double click or by ctrl + click? I heard something about aliases in the Data Editor, though trying out things didn't help, because if I switch off the alias, the unit can't be clicked at all.
I am currently testing the import of custom made icons. After implementing them though for abilities, when you click on them, nothing happens. When you click on an ability with an default icon, it receives a slight glow, indicating, that it is being clicked.
After searching the assets/textures folder I found dds which are called btn-border-ability which seems to be the standard border for all SC2 icons, which is also tinted by race if the option is activated in the Data Editor. I found no second dds though, which should represent that the button is being clicked. How is this done then? Any ideas? Is there maybe already a tutorial for it? I searched for icon and glow and didn't find anything useful :/
I don't know if I understood you correctly, but here is something you could try:
Events:
Dialog - Any Dialog Item is used by Player Any Player with event type Clicked
Local variables:
i = 0 <Integer>
Conditions:
Actions:
For each integer i from 0 to 50 with increment 1, do (Actions)
General - If (Conditions) then do (Actions) else do (Actions)
If
(Used dialog item) == YourButtonArray[i]
Then
Do whatever you like
General - Break
Else
The 50 is just a number i chose. It should be the number of the last index of your array.
Awesome, I did it! It's probably the most inperformant way, but it works.
What I wanted to do is to display the remaining duration of a buff or debuff in the buff or debuff's tooltip, when the player goes with the mouse over the buff or debuff. The problem is, there can be several buffs of the same type on different units simultaneously, though technically it is only one tooltip, that can be displayed on all buff of the type, because they are instances of the original behavior in the Data Editor.
What I did, is save the buff, it's victim and caster and its duration within different arrays, while i made sure, the index of it is always the same number. Then the logical thought was, that the player can only put the mouse over a buff of only one unit at the same time. So I made a trigger, which updates all durations of all buffs in the tooltip, by writing the buff's and debuff's durations from their duration array into their field values and by doing this changing the value, the data reference of the behavior is referring to on the unit he selects the moment he selects it.
Arrays are quite a bit tricky, but when it is made sure, that the index of the equivalent values of a behavior stays the same, one can achieve this update by using only one for-each-int-loop per buff or debuff on the selected unit.
Phew, I'm so glad it works. What is left is to make sure, the arrays are cleared when the unit dies and then it is fully functional :D
Edit: I'll change the topic to something more suitable so others who want to achieve the same effect might find the thread.
Okay, the threads helped, now it works. Problem was, that I was indeed writing into a restricted field, which caused the ingame error. But the issue I want to implement is so complicated, I don't even dare to ask for it here. I'll try some stuff myself first and then when I am out of possibilities, I come back annoying you once again :)
This local thing seemed indeed to be the mistake. I just thought local meaned the actual unit's it actor was directed to, instead of all units of this type, so i might set units of the same type to a different color. Ok what do the values 'Blend Type' and 'Label' for? They aren't there in the set tint local version.
Unit - Create 1 Air Elemental for player 1 at (Center of Ally1) facing 0.0 degrees (No Options)
Variable - Set Ally1 = (Last created unit)
Unit - Create 1 Air Elemental for player 1 at (Center of Ally2) facing 0.0 degrees (No Options)
Variable - Set Ally2 = (Last created unit)
Unit - Create 1 Air Elemental for player 1 at (Center of Ally3) facing 0.0 degrees (No Options)
Variable - Set Ally3 = (Last created unit)
Unit - Create 1 Air Elemental for player 2 at (Center of Enemy1) facing 180.0 degrees (No Options)
Variable - Set Enemy1 = (Last created unit)
Unit - Create 1 Air Elemental for player 2 at (Center of Enemy2) facing 180.0 degrees (No Options)
Variable - Set Enemy2 = (Last created unit)
Unit - Create 1 Air Elemental for player 2 at (Center of Enemy3) facing 180.0 degrees (No Options)
Variable - Set Enemy3 = (Last created unit)
Trigger - Run Units - Set Tint (Ignore Conditions, Don't Wait until it finishes)
This is the trigger, that creates the units and launches the Set Tint Trigger auftwerwars. The Enemies are saved into variables the same way, the Allies are. How could there possibly go something wrong with their actors? The only thing that is different from the allies and enemies, that enemies are facing 180.0 degrees after creation. But that can't be the mistake, can it? I really don't get what is going wrong here.
Edit: The AllyX and EnemyX in "Center of X" are constant unattached regions.
Here are the actions used by the trigger. The trigger has no local variables, events or conditions and is run by another trigger.
Actor - Send actor message AirTint to main actor of unit Ally1
Actor - Send actor message AirTint to main actor of unit Ally2
Actor - Send actor message AirTint to main actor of unit Ally3
Actor - Send actor message AirTint to main actor of unit Enemy1
Actor - Send actor message AirTint to main actor of unit Enemy2
Actor - Send actor message AirTint to main actor of unit Enemy3
AirTint, Ally1-3 and Enemy1-3 are variables. AirTint is the actor message for the color tint, which I made in order to be able to change the tint by changing only the variable instead of all the 6 actions. The variables of the units are saved directly after creation in another trigger. They definately work, because I use them all the time in other triggers. I also made tests, where i put the actions in an empty trigger, adding a keyboard event. Same outcome. Ally1-3 are tinted, Enemy1-3 not.
Are the catalogs actually some kind of tables created by blizzard, permanently locked into the game or is new stuff added when creating custom stuff? Because if you go into setting a tooltip for a button or behaviour and go to data reference, the entries of custom made behaviors and buttons are empty. Can they be "filled" if they're written into or does it work entirely different? It would be quite a lot of work to write durations from every buff into random pre-made catalog units without getting lost in the structure in the process. Would be much easier if the values of custom buttons and behaviors could be changed and written into the tooltips on runtime.
Hi, I searched for "Catalog Field Value" and only found some advanced stuff, which goes deep into programming. Could someone give just an example what to write into the trigger, to get to the value one wants to have.
For example, I have an custom ability called let's say Maim. This ability is linked to a buff behavior. What I want is to set the duration of the buff manually during runtime / show it in the tooltip. What do I have to write into
Catalog - Set value of Abilities Entry Field Path for player (Triggering player) to ""
trigger to get what I want? Please keep it simple and write as if you were explaining it to a complete beginner instead of posting links to tutorials I won't understand.
0
@Helral: Go
Thanks for your replay and sorry about the wrong section.
For triggering:
I tried this one already. It is too slow. There is a short, barely visible moment the trigger needs to be triggered. If one clicks during this exact moment, the 1st index unit from the selected unit group will be set as the one i want to be set instead the unit that was clicked.
So there is really no way to disable it in the Data Editor? Because for example enemy units can't be selected that way. The question is, where that is achieved.
Edit: Ok, in my case, there is an other way, I could probably solve the problem, though I can't find the right condition for that. What I need is to check if the unit is commandable. Is there something I've overseen?
0
Hi,
is there a way to prevent same type selection? The selection by double click or by ctrl + click? I heard something about aliases in the Data Editor, though trying out things didn't help, because if I switch off the alias, the unit can't be clicked at all.
ty
Greetz, Shianky
0
@Kueken531: Go
Is there something you don't know? :P
I defined a background color now and made the icon grayscaled and now it works fine. The standard SC2 border is there and the glow too.
ty!
0
Hi,
I am currently testing the import of custom made icons. After implementing them though for abilities, when you click on them, nothing happens. When you click on an ability with an default icon, it receives a slight glow, indicating, that it is being clicked.
After searching the assets/textures folder I found dds which are called btn-border-ability which seems to be the standard border for all SC2 icons, which is also tinted by race if the option is activated in the Data Editor. I found no second dds though, which should represent that the button is being clicked. How is this done then? Any ideas? Is there maybe already a tutorial for it? I searched for icon and glow and didn't find anything useful :/
Greetz, Shianky
0
@JackRCDF: Go
The video tutorial results in 404-Kitten. Would you mind, uploading it again or give me a new link?
ty
0
@Exaken: Go
Well that was quick!
Thank you, sir. :P
0
@Pshyched: Go
Nice! All the icons from Warcraft III then please :D
0
@DerNalia: Go
I don't know if I understood you correctly, but here is something you could try:
Events: Dialog - Any Dialog Item is used by Player Any Player with event type Clicked Local variables: i = 0 <Integer> Conditions: Actions: For each integer i from 0 to 50 with increment 1, do (Actions) General - If (Conditions) then do (Actions) else do (Actions) If (Used dialog item) == YourButtonArray[i] Then Do whatever you like General - Break Else
The 50 is just a number i chose. It should be the number of the last index of your array.
0
@BasharTeg: Go
Awesome, I did it! It's probably the most inperformant way, but it works.
What I wanted to do is to display the remaining duration of a buff or debuff in the buff or debuff's tooltip, when the player goes with the mouse over the buff or debuff. The problem is, there can be several buffs of the same type on different units simultaneously, though technically it is only one tooltip, that can be displayed on all buff of the type, because they are instances of the original behavior in the Data Editor.
What I did, is save the buff, it's victim and caster and its duration within different arrays, while i made sure, the index of it is always the same number. Then the logical thought was, that the player can only put the mouse over a buff of only one unit at the same time. So I made a trigger, which updates all durations of all buffs in the tooltip, by writing the buff's and debuff's durations from their duration array into their field values and by doing this changing the value, the data reference of the behavior is referring to on the unit he selects the moment he selects it.
Arrays are quite a bit tricky, but when it is made sure, that the index of the equivalent values of a behavior stays the same, one can achieve this update by using only one for-each-int-loop per buff or debuff on the selected unit.
Phew, I'm so glad it works. What is left is to make sure, the arrays are cleared when the unit dies and then it is fully functional :D
Edit: I'll change the topic to something more suitable so others who want to achieve the same effect might find the thread.
0
@BasharTeg: Go
Okay, the threads helped, now it works. Problem was, that I was indeed writing into a restricted field, which caused the ingame error. But the issue I want to implement is so complicated, I don't even dare to ask for it here. I'll try some stuff myself first and then when I am out of possibilities, I come back annoying you once again :)
0
@Kueken531: Go
This local thing seemed indeed to be the mistake. I just thought local meaned the actual unit's it actor was directed to, instead of all units of this type, so i might set units of the same type to a different color. Ok what do the values 'Blend Type' and 'Label' for? They aren't there in the set tint local version.
Thank you very much both of you!
0
@BasharTeg: Go
Unit - Create 1 Air Elemental for player 1 at (Center of Ally1) facing 0.0 degrees (No Options)
Variable - Set Ally1 = (Last created unit)
Unit - Create 1 Air Elemental for player 1 at (Center of Ally2) facing 0.0 degrees (No Options)
Variable - Set Ally2 = (Last created unit)
Unit - Create 1 Air Elemental for player 1 at (Center of Ally3) facing 0.0 degrees (No Options)
Variable - Set Ally3 = (Last created unit)
Unit - Create 1 Air Elemental for player 2 at (Center of Enemy1) facing 180.0 degrees (No Options)
Variable - Set Enemy1 = (Last created unit)
Unit - Create 1 Air Elemental for player 2 at (Center of Enemy2) facing 180.0 degrees (No Options)
Variable - Set Enemy2 = (Last created unit)
Unit - Create 1 Air Elemental for player 2 at (Center of Enemy3) facing 180.0 degrees (No Options)
Variable - Set Enemy3 = (Last created unit)
Trigger - Run Units - Set Tint (Ignore Conditions, Don't Wait until it finishes)
This is the trigger, that creates the units and launches the Set Tint Trigger auftwerwars. The Enemies are saved into variables the same way, the Allies are. How could there possibly go something wrong with their actors? The only thing that is different from the allies and enemies, that enemies are facing 180.0 degrees after creation. But that can't be the mistake, can it? I really don't get what is going wrong here.
Edit: The AllyX and EnemyX in "Center of X" are constant unattached regions.
0
@BasharTeg: Go
Here are the actions used by the trigger. The trigger has no local variables, events or conditions and is run by another trigger.
Actor - Send actor message AirTint to main actor of unit Ally1
Actor - Send actor message AirTint to main actor of unit Ally2
Actor - Send actor message AirTint to main actor of unit Ally3
Actor - Send actor message AirTint to main actor of unit Enemy1
Actor - Send actor message AirTint to main actor of unit Enemy2
Actor - Send actor message AirTint to main actor of unit Enemy3
AirTint, Ally1-3 and Enemy1-3 are variables. AirTint is the actor message for the color tint, which I made in order to be able to change the tint by changing only the variable instead of all the 6 actions. The variables of the units are saved directly after creation in another trigger. They definately work, because I use them all the time in other triggers. I also made tests, where i put the actions in an empty trigger, adding a keyboard event. Same outcome. Ally1-3 are tinted, Enemy1-3 not.
0
Are the catalogs actually some kind of tables created by blizzard, permanently locked into the game or is new stuff added when creating custom stuff? Because if you go into setting a tooltip for a button or behaviour and go to data reference, the entries of custom made behaviors and buttons are empty. Can they be "filled" if they're written into or does it work entirely different? It would be quite a lot of work to write durations from every buff into random pre-made catalog units without getting lost in the structure in the process. Would be much easier if the values of custom buttons and behaviors could be changed and written into the tooltips on runtime.
0
Hi, I searched for "Catalog Field Value" and only found some advanced stuff, which goes deep into programming. Could someone give just an example what to write into the trigger, to get to the value one wants to have.
For example, I have an custom ability called let's say Maim. This ability is linked to a buff behavior. What I want is to set the duration of the buff manually during runtime / show it in the tooltip. What do I have to write into
Catalog - Set value of Abilities Entry Field Path for player (Triggering player) to ""
trigger to get what I want? Please keep it simple and write as if you were explaining it to a complete beginner instead of posting links to tutorials I won't understand.
Thank you!