In "Events +" of the beam create a new event "Actor Creation" with action "Set Tint Color", setting the colour to what you want. Be aware however that this won't look very good, since it just puts a blanket tint over the beam to your chosen colour, I suspect you'd have to mess around with textures to get it to look good, or they may be some option I'm missing.
"Stats - Supplies" is a property in the "Units" section of the data editor. It will be something negative to start with, since the units are removing supply.
1) I'm assuming your super monster is placed at Point 001 when the map starts? If so you can simply set your kill trigger to kill a value from the list in the action. If not, create a global variable of type unit and save the super monster to it when it spawns, then kill the unit of the value in the variable after 1 minute.
2) I'd suggest using the data editor over triggers for this. Create two effects, 'Healing Aura (Heal)' of type "Modify Unit" with "Effect - Vitals +" set to "(0|0|0):(0.05|0|0)" (this will heal 5% of the units health), and 'Healing Aura (Search)' of type "Search Area". Set the area to have the desired radius and the effect to 'Healing Aura (Heal)'. Then create a behaviour 'Healing Aura (Behavior)' of type "Buff" with "Effect - Effect - Periodic" set to 'Healing Aura (Search)', "Stats - Duration" set to "-1.0000" and "Stats - Period" set to "1" (or whatever you want to tick frequency to be). Then give this behaviour to your healing fountain/main base in the "Behavior - Behaviors +" section of the unit. For clarities sake the attached map has this behaviour on a medivac.
3) Set the "Stats - Supplies" of all units to "0".
4) Use an event which will fire when the building is built, e.g. "Unit Is Created" event with ability set to whatever the build ability of you map is. Use a condition to check if it's of one of the types that should spawn a hero and if it is spawn a hero next to it with a "Create Units With Default Facing" action, setting the player to "Owner of (Created Unit))".
I had thought of this, but I could not find a quick way to make the behavior apply for when I use it, see I'm having the animation play when the "Colony Ship" builds a "City" to make it seem like the colony ship is landing in order to construct a new city, so as of now I have the event playing when the build ability is doing it's .workerstart.
You could make an apply behaviour effect which is run in a set together with the 'build a city' effect, giving it a duration equal to the build time.
Whilst you can't have actual dynamic arrays, you can simulate them using the data tables functions/actions. I also had this problem in one of my maps (declaring a large number of static arrays to compensate for the lack of actual dynamic arrays), which caused me to investigate them in the first place. See this post for how to simulate a dynamic array using the data tables, which should relieve the problem unless it's caused by something else entirely, or you are using more than the 440000ish variable limit.
Functions and actions are different objects. A function takes some input parameters and returns a value, set in the "Return Type: <type>" field. An action takes some parameters and does something, but doesn't return any value. Looking at the above screen shot you have defined a function and are attempting to call it as an action, which doesn't work.
Having looked at it a bit closer I've found a workaround. Create two validators, one of the type "Unit Filters" with "Validator - Filters" set to "Excluded: Dead" and "Validator - Unit +" set to "Target", the other of the type "Combine", "Validator - Type" set to "And" and "Validator - Combines" set to "(Caster Not Dead|<The first validator>)".
Set the period of the persistent effect to be something short (0.5s seemed to work for me) and set the periodic validator to the combine validator you just created.
To create a permanent beam, use a persistent linking the caster and target units. Create a "Beam (Simple)" actor which runs the "Attack" animation, "Variation 02" (others may work) continuously whilst it exists and have its creations and destruction tied to the persistent's starting/stopping. Then have your ability fire the persistent effect at the target unit to create a beam between the two. Have a look at the "Beam" ability in the attached map if this isn't clear.
It's on the "Research Blink" button if you want to see it.
You can only associate one value with any given string at a time. The code you suggested would simply overwrite the value 5.0 <real> with 3 <int> and attempting to recall the real value would return 0.0.
Is this guaranteed to actually terminate? Unless I'm missing something about what one of these actions does I don't see anything that would exit the loop after a zergling has been spawned, rather than just spawning them endlessly.
[This possibly belongs in the wiki, but there does not seem to be a relevant page for it.]
Data tables are a list of values associated with a string used to access the given value. As with standard variables there are two kinds of data table; the global data table, which is accessible from any trigger, and the local data table, which can only be accessed from within the trigger in which the values in it were stored.
In terms of basic functionality the data tables behave in much the same way as variables. The action
however there are some important differences, which allow the data table to be used with much greater flexibility.
First, when we store a value in the data table we simply assign it a string as we are saving it. There is no need to first create a blank entry, as an equivalent action to initialising a variable.
Secondly, we can perform any string manipulation we wish at the time of saving, recalling or otherwise acting on a data table entry. This allows us to simulate a number of features galaxy otherwise lacks, most notable dynamic arrays. For example consider the following trigger:
The strings here are produced as a Custom Script. Strings are entered directly within quotation marks. “+” is used to conjoin strings, the same as the “Combine Strings” function. “IntToString(<int>)” returns a string from the given integer, eg IntToString(5) == “5”. lv_<Script Identifier> is used to access a given local variable. The scrip identifier is found in the details of the variable and by default is the name of the variable with no spaces and beginning with a lower case letter, so "My First Variable" would become "myFirstVaraible". gv_<Script Identifier> and lp_<Script Identifier> are used to access global variable and parameters (for custom actions) respectively.
The condition “Data Table Value Exists” allows us to check whether we have already store a value in the pseudo-array at values of i, incrementing until we reach an unused value through a while loop.
Whilst the data tables are more flexible than standard variables, they also have to be treated with more care. In order to recall an entry in the data table the string must be exactly the same, including capitals, spaces, punctuation etc. Furthermore the value in the data table has a type associated with it, however it will not return an error if you try to implicitly change this type. For example if we have and integer n then
will set n to be 0, the default for an integer, not 5, since 5.0, a real value, is stored in the data table. You can check the type of value stored in the data table with the “Type Of Data Table Value” function.
To remove a specific data table value use the “Remove Data Table Value” action and to clear a data table use the “Clear Data Table” action.
0
@wowacesucksmassivekok: Go
In "Events +" of the beam create a new event "Actor Creation" with action "Set Tint Color", setting the colour to what you want. Be aware however that this won't look very good, since it just puts a blanket tint over the beam to your chosen colour, I suspect you'd have to mess around with textures to get it to look good, or they may be some option I'm missing.
0
@Peetahh: Go
"Stats - Supplies" is a property in the "Units" section of the data editor. It will be something negative to start with, since the units are removing supply.
0
@Zackreaver: Go
What about
0
@Peetahh: Go
1) I'm assuming your super monster is placed at Point 001 when the map starts? If so you can simply set your kill trigger to kill a value from the list in the action. If not, create a global variable of type unit and save the super monster to it when it spawns, then kill the unit of the value in the variable after 1 minute.
2) I'd suggest using the data editor over triggers for this. Create two effects, 'Healing Aura (Heal)' of type "Modify Unit" with "Effect - Vitals +" set to "(0|0|0):(0.05|0|0)" (this will heal 5% of the units health), and 'Healing Aura (Search)' of type "Search Area". Set the area to have the desired radius and the effect to 'Healing Aura (Heal)'. Then create a behaviour 'Healing Aura (Behavior)' of type "Buff" with "Effect - Effect - Periodic" set to 'Healing Aura (Search)', "Stats - Duration" set to "-1.0000" and "Stats - Period" set to "1" (or whatever you want to tick frequency to be). Then give this behaviour to your healing fountain/main base in the "Behavior - Behaviors +" section of the unit. For clarities sake the attached map has this behaviour on a medivac.
3) Set the "Stats - Supplies" of all units to "0".
4) Use an event which will fire when the building is built, e.g. "Unit Is Created" event with ability set to whatever the build ability of you map is. Use a condition to check if it's of one of the types that should spawn a hero and if it is spawn a hero next to it with a "Create Units With Default Facing" action, setting the player to "Owner of (Created Unit))".
0
You could make an apply behaviour effect which is run in a set together with the 'build a city' effect, giving it a duration equal to the build time.
0
Whilst you can't have actual dynamic arrays, you can simulate them using the data tables functions/actions. I also had this problem in one of my maps (declaring a large number of static arrays to compensate for the lack of actual dynamic arrays), which caused me to investigate them in the first place. See this post for how to simulate a dynamic array using the data tables, which should relieve the problem unless it's caused by something else entirely, or you are using more than the 440000ish variable limit.
0
@TheLynxy: Go
Functions and actions are different objects. A function takes some input parameters and returns a value, set in the "Return Type: <type>" field. An action takes some parameters and does something, but doesn't return any value. Looking at the above screen shot you have defined a function and are attempting to call it as an action, which doesn't work.
0
@SBeier: Go
Having looked at it a bit closer I've found a workaround. Create two validators, one of the type "Unit Filters" with "Validator - Filters" set to "Excluded: Dead" and "Validator - Unit +" set to "Target", the other of the type "Combine", "Validator - Type" set to "And" and "Validator - Combines" set to "(Caster Not Dead|<The first validator>)".
Set the period of the persistent effect to be something short (0.5s seemed to work for me) and set the periodic validator to the combine validator you just created.
0
@SBeier: Go
To create a permanent beam, use a persistent linking the caster and target units. Create a "Beam (Simple)" actor which runs the "Attack" animation, "Variation 02" (others may work) continuously whilst it exists and have its creations and destruction tied to the persistent's starting/stopping. Then have your ability fire the persistent effect at the target unit to create a beam between the two. Have a look at the "Beam" ability in the attached map if this isn't clear.
It's on the "Research Blink" button if you want to see it.
0
@Zackreaver: Go
You could also use a buff to change the units height. It's under "Behaviour - Modification +", "Unit".
0
@gizmachu: Go
You can only associate one value with any given string at a time. The code you suggested would simply overwrite the value 5.0 <real> with 3 <int> and attempting to recall the real value would return 0.0.
0
@Skittles17: Go
Three thoughts:
1) Is the "/" character allowed in a variable name? It's possible, though unlikely that this is causing it to fall over.
2) Line 32.
Are you sure you can pass "Triggering unit" into a custom action?
3)
Is this guaranteed to actually terminate? Unless I'm missing something about what one of these actions does I don't see anything that would exit the loop after a zergling has been spawned, rather than just spawning them endlessly.
0
[This possibly belongs in the wiki, but there does not seem to be a relevant page for it.]
Data tables are a list of values associated with a string used to access the given value. As with standard variables there are two kinds of data table; the global data table, which is accessible from any trigger, and the local data table, which can only be accessed from within the trigger in which the values in it were stored.
In terms of basic functionality the data tables behave in much the same way as variables. The action
is almost exactly the same as
however there are some important differences, which allow the data table to be used with much greater flexibility.
First, when we store a value in the data table we simply assign it a string as we are saving it. There is no need to first create a blank entry, as an equivalent action to initialising a variable.
Secondly, we can perform any string manipulation we wish at the time of saving, recalling or otherwise acting on a data table entry. This allows us to simulate a number of features galaxy otherwise lacks, most notable dynamic arrays. For example consider the following trigger:
The strings here are produced as a Custom Script. Strings are entered directly within quotation marks. “+” is used to conjoin strings, the same as the “Combine Strings” function. “IntToString(<int>)” returns a string from the given integer, eg IntToString(5) == “5”. lv_<Script Identifier> is used to access a given local variable. The scrip identifier is found in the details of the variable and by default is the name of the variable with no spaces and beginning with a lower case letter, so "My First Variable" would become "myFirstVaraible". gv_<Script Identifier> and lp_<Script Identifier> are used to access global variable and parameters (for custom actions) respectively.
The condition “Data Table Value Exists” allows us to check whether we have already store a value in the pseudo-array at values of i, incrementing until we reach an unused value through a while loop.
Whilst the data tables are more flexible than standard variables, they also have to be treated with more care. In order to recall an entry in the data table the string must be exactly the same, including capitals, spaces, punctuation etc. Furthermore the value in the data table has a type associated with it, however it will not return an error if you try to implicitly change this type. For example if we have and integer n then
will set n to be 0, the default for an integer, not 5, since 5.0, a real value, is stored in the data table. You can check the type of value stored in the data table with the “Type Of Data Table Value” function.
To remove a specific data table value use the “Remove Data Table Value” action and to clear a data table use the “Clear Data Table” action.
0
@Chrinux: Go
You could simply nest all of the if statements, so that instead of
you have
Thus you would only need 1 trigger, rather than a full set of different ones.
0
@zeredek: Go
The condition you want is called "Unit Has Behaviour".