EDIT: Solved! Woohoo! So, if anyone wants access to fields in the data editor from the Triggers, here's how you do it:
Basically, whatever value you want, will come to you as a string. So, make a local var that's a string. Then select "Set Variable", and select your string.
The Function we're looking for is under the "Catalog" category, and specifically what you want is something like what I'm using here (to get the Score Value of a Zergling)
Variable - Set str = (Value of Units "Zergling" "ScoreKill" for player Any Player)
There are three parameters for this function. The first one, you select your data type. (In my instance, it's Unit.) The second, you select what object specifically, (Zergling, Marine, etc.). The third, it's what value you're looking for (again, for my case, ScoreKill.) To find the value name, in the Data Edtior, press Ctrl+D (or select, "View Raw values"), and check to see what it is. Here it was "CUnit_ScoreKill"
Hope this helps!
**************
Original Post
**************
Dunno if this is exactly the right place to post this, but basically I want to access the
Stats - Score - Kill
value of a unit type in the Triggers. I'm pretty sure this is doable, but I've perused around a lot and been unsuccessful.
I assume there is some generic way to access the values found in the data editor?
Basically when a unit dies (that belongs to the creeps in my map), I want to award the player points for killing it, based off its score. I could also base it off of it's supply, but I'd rather use score if possible (since both this is score to help win the game, and changing supply to do this just seems kind of wacky)
Solved! Woohoo! So, if anyone wants access to fields in the data editor from the Triggers, here's how you do it:
Basically, whatever value you want, will come to you as a string. So, make a local var that's a string. Then select "Set Variable", and select your string.
The Function we're looking for is under the "Catalog" category, and specifically what you want is something like what I'm using here (to get the Score Value of a Zergling)
Variable - Set str = (Value of Units "Zergling" "ScoreKill" for player Any Player)
There are three parameters for this function. The first one, you select your data type. (In my instance, it's Unit.) The second, you select what object specifically, (Zergling, Marine, etc.). The third, it's what value you're looking for (again, for my case, ScoreKill.) To find the value name, in the Data Edtior, press Ctrl+D (or select, "View Raw values"), and check to see what it is. Here it was "CUnit_ScoreKill"
Hope this helps! (I put this at the top too)
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
EDIT: Solved! Woohoo! So, if anyone wants access to fields in the data editor from the Triggers, here's how you do it:
Basically, whatever value you want, will come to you as a string. So, make a local var that's a string. Then select "Set Variable", and select your string.
The Function we're looking for is under the "Catalog" category, and specifically what you want is something like what I'm using here (to get the Score Value of a Zergling)
Variable - Set str = (Value of Units "Zergling" "ScoreKill" for player Any Player)
There are three parameters for this function. The first one, you select your data type. (In my instance, it's Unit.) The second, you select what object specifically, (Zergling, Marine, etc.). The third, it's what value you're looking for (again, for my case, ScoreKill.) To find the value name, in the Data Edtior, press Ctrl+D (or select, "View Raw values"), and check to see what it is. Here it was "CUnit_ScoreKill"
Hope this helps!
************** Original Post ************** Dunno if this is exactly the right place to post this, but basically I want to access the
Stats - Score - Kill
value of a unit type in the Triggers. I'm pretty sure this is doable, but I've perused around a lot and been unsuccessful.
I assume there is some generic way to access the values found in the data editor?
first of all why you want to do it, when and what unit?
like all the units of a player. multiple times in a map etc...
@Jackolas: Go
Basically when a unit dies (that belongs to the creeps in my map), I want to award the player points for killing it, based off its score. I could also base it off of it's supply, but I'd rather use score if possible (since both this is score to help win the game, and changing supply to do this just seems kind of wacky)
Solved! Woohoo! So, if anyone wants access to fields in the data editor from the Triggers, here's how you do it:
Basically, whatever value you want, will come to you as a string. So, make a local var that's a string. Then select "Set Variable", and select your string.
The Function we're looking for is under the "Catalog" category, and specifically what you want is something like what I'm using here (to get the Score Value of a Zergling)
Variable - Set str = (Value of Units "Zergling" "ScoreKill" for player Any Player)
There are three parameters for this function. The first one, you select your data type. (In my instance, it's Unit.) The second, you select what object specifically, (Zergling, Marine, etc.). The third, it's what value you're looking for (again, for my case, ScoreKill.) To find the value name, in the Data Edtior, press Ctrl+D (or select, "View Raw values"), and check to see what it is. Here it was "CUnit_ScoreKill"
Hope this helps! (I put this at the top too)