A dialog does not automatically update when variables are changed. So you have to set the title again with the updated variable. Store the dialog in a global variable and then in your "Timer - Elapsed 10 seconds" trigger, use "Dialog - set title of MyVariableDialog to (etc.)"
If you're looking for a way to store a unit's orders just prior to it's death (other than with a periodic) I'm not sure, but maybe you could try the "Unit takes Damage" event and see if it triggers before the actual unit death? If it did you could temporarily store the unit's current orders and then re-issue them upon the unit's revival.
Yes you could, but I don't understand why don't you just make the units invulnerable if they are just going to revive instantly anyway?
There is several ways you could do that, one example:
Have a trigger with the events:
Any Unit comes within 0.02 of point A
Any Unit comes within 0.02 of point B
Any Unit comes within 0.02 of point C
etc.
Conditions:
Unit is of type (the type that is following the route)
Actions:
Set custom value 0 of unit to ((custom value 0 of unit) + 1)
And in your "Unit Dies" trigger, have all the points in an array (or use "get point from name" if they are numbered points), and order the unit to move to the points starting with the array index of (custom value 0 of triggering unit) and ending with the max index of the array.
Not sure about the lag of that, you could test it out...
By the way the minimum wait time for a periodic trigger is 0.0625 seconds so if you put in 0.001 it will actually be pushed up to 0.0625, which is a useful thing to know.
You can use "Combine Strings" in combination with "Convert Real to String" to set the scale using a variable when setting the catalog field value. (So you don't have to set the size stages manually)
Have an integer counter and a global array variable of type point: mineralPositions[MAX_MINERALS]
Then make an action:
"Pick each unit in unit group - 'Mineral Field' units in region - entire map"
For each picked unit:
Set mineralPositions[counter] = position of (Picked Unit);
counter = counter+1;
That will store the positions of all the minerals on the map in the mineralPositions array, which you can later loop through to restore the mineral positions.
0
@SoulTaker916: Go
You sure? I was under the impression he meant in the map. Otherwise what has this got to do with triggers?
0
It comes up with a text box which you can copy the link from. I don't think it's possible to have a direct link which opens your web browser.
0
@Bennyha1: Go
You want it to keep counting?
If so you must change your TRIGGER 2...
Change your event:
"Timer - Elapsed time is 10 game time seconds." to
"Periodic Event", "Timer - Every 10 seconds of game time"
0
A dialog does not automatically update when variables are changed. So you have to set the title again with the updated variable. Store the dialog in a global variable and then in your "Timer - Elapsed 10 seconds" trigger, use "Dialog - set title of MyVariableDialog to (etc.)"
0
@DeltaV: Go
If you're looking for a way to store a unit's orders just prior to it's death (other than with a periodic) I'm not sure, but maybe you could try the "Unit takes Damage" event and see if it triggers before the actual unit death? If it did you could temporarily store the unit's current orders and then re-issue them upon the unit's revival.
0
@bulletbutter: Go
Yes you could, but I don't understand why don't you just make the units invulnerable if they are just going to revive instantly anyway?
There is several ways you could do that, one example:
Have a trigger with the events:
Conditions:
Actions:
And in your "Unit Dies" trigger, have all the points in an array (or use "get point from name" if they are numbered points), and order the unit to move to the points starting with the array index of (custom value 0 of triggering unit) and ending with the max index of the array.
0
@njordys: Go
If that doesn't work, just load the model up in the cutscene editor and see what animations it has.
0
@wisesquirrel: Go
Not sure about the lag of that, you could test it out...
By the way the minimum wait time for a periodic trigger is 0.0625 seconds so if you put in 0.001 it will actually be pushed up to 0.0625, which is a useful thing to know.
0
@wisesquirrel: Go
You can use "Combine Strings" in combination with "Convert Real to String" to set the scale using a variable when setting the catalog field value. (So you don't have to set the size stages manually)
0
@njordys: Go
There's an action "Create Model at Point".
Use that, wait a bit, then use action "Kill model" or Send actor message "Destroy Immediate".
In some cases the animation will only start when you kill the actor model (If it only has a death animation)
0
The "Pick each unit in unit group" is the loop. It loops through all the units in the group.
If you want to know more about basic loops I recommend you checkout some tutorials: http://www.sc2mapster.com/wiki/galaxy/tutorials/
http://wiki.sc2mapster.com/Tutorials
In particular: Basic Triggers
0
@Fhekgor: Go
Yeah, set the counter to 0 before you start the loop (or 1 if you want to start there).
Yup you definitely can reuse it just set it back to its initial value again.
Edit: UNLESS you want to use it to store the total number of minerals and in that case you can't reuse it.
0
Sorry, the one I meant was "Unit Group: Units In Region Matching Condition"
Edit: And then change "Any" to "Mineral Field"
0
Have an integer counter and a global array variable of type point: mineralPositions[MAX_MINERALS]
Then make an action:
"Pick each unit in unit group - 'Mineral Field' units in region - entire map"
For each picked unit:
Set mineralPositions[counter] = position of (Picked Unit);
counter = counter+1;
That will store the positions of all the minerals on the map in the mineralPositions array, which you can later loop through to restore the mineral positions.
0
@bulletbutter: Go
'Tis true, but the model in question, "Zerus Plantlife", tints fine with hdr 1.0