I'm venturing here because I'm facing myself a rough patch of trigger-editing.
What I want to achieve is this: I have a map with a boss unit, very large in size and with a shit-ton of HP. However, the player needs to defeat that boss by killing other units on the field, and apply their killscore (or original starting life) as a number that should be subtracted from the healthpool of the boss. Example: Boss health = 1000, player kills 3 marines (with killscore of 50) --> boss health gets reduced/updated to 850.
I have the required triggers in place that defines which players units, in what conditions should be counted for. I've used a textmessage check to see that it works. What I'm failing at however, is how do I get either the original life or killscore from whichever unit died and store it in a variable.
I've tried using unit properties but all these come back with 0... (probably because the unit has 0 left upon death. And I can't find how to even get the kill score of a unit.
Then there's part 2 of my struggle... How do I apply the number (50 from a marine kill) as damage to a specific unit. I've found a trigger called "Damage Unit (from Unit)" which sounds like it could do the trick, however this one reads effects... How do a convert my variable to an effect, if at all possible.
If anyone has ever created some like what I'm looking for in the past, please let me know how that was done. Because I'm not sure if my direction is going to lead anywhere. Small rant... SC1 Editor, simple as it might be.. was a whole lot easier in achieving this.
I think it's something like modify unit property (select life) and substract desired ammount. I wouldn't bother with any kind of variables if you know how much health the killed units have. Like if you know you kill a marine who has 50 health, just use: Unit Dies (Marine) -> modify "boss" life - subtract 50.
Making it manual then. I did try to use the set property before, probably got nothing from the variables to subtract, maybe making if then cases that identify the unit type and make integers for the amount to subtract. Sounds solid enough.
Small update from my side, and for those who are interested. Yesterday late I used the deal damage action with the triggering units damage effect setting. While is wasn't the values I wanted. It did work in that each unit killed subtracted life from the target.
Hi Mapster,
I'm venturing here because I'm facing myself a rough patch of trigger-editing.
What I want to achieve is this:
I have a map with a boss unit, very large in size and with a shit-ton of HP. However, the player needs to defeat that boss by killing other units on the field, and apply their killscore (or original starting life) as a number that should be subtracted from the healthpool of the boss.
Example: Boss health = 1000, player kills 3 marines (with killscore of 50) --> boss health gets reduced/updated to 850.
I have the required triggers in place that defines which players units, in what conditions should be counted for. I've used a textmessage check to see that it works.
What I'm failing at however, is how do I get either the original life or killscore from whichever unit died and store it in a variable.
I've tried using unit properties but all these come back with 0... (probably because the unit has 0 left upon death. And I can't find how to even get the kill score of a unit.
Then there's part 2 of my struggle... How do I apply the number (50 from a marine kill) as damage to a specific unit.
I've found a trigger called "Damage Unit (from Unit)" which sounds like it could do the trick, however this one reads effects... How do a convert my variable to an effect, if at all possible.
If anyone has ever created some like what I'm looking for in the past, please let me know how that was done. Because I'm not sure if my direction is going to lead anywhere.
Small rant... SC1 Editor, simple as it might be.. was a whole lot easier in achieving this.
Custom Campaign Initiative
In reply to WingedArchon:
You can use Catalog Value Get to find the values of the kill score.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
In reply to DaveSpectre122:
Making it manual then. I did try to use the set property before, probably got nothing from the variables to subtract, maybe making if then cases that identify the unit type and make integers for the amount to subtract. Sounds solid enough.
In reply to DrSuperEvil:
I'll do another search for that.
Small update from my side, and for those who are interested. Yesterday late I used the deal damage action with the triggering units damage effect setting. While is wasn't the values I wanted. It did work in that each unit killed subtracted life from the target.
I'll update when I have new insights.
Custom Campaign Initiative