Yeah, this would be incredibly helpful and it's gotta be there. I mean, when an SCV returns to a Command Center, a function fires to transfer what the SCV is holding to the player's resource count, so there should be a way to get that mid-trigger and redirect it to something else. Should also be able to trigger the event itself differently, like when the gatherer dies.
Wondering how Blizzard will fix the MULE bug where the MULE can expire because of its timer mid-trip and like 30 minerals will just disappear from the game, and I figure that sounds like a script issue or something they could do in there. So we should be able to do something about it. But I just haven't found it yet, although I haven't gotten too deep into GalaxyScript yet either, still leafing through the triggers and new data editor.
Interested in a plundering system for my map though where a player gains the resources that a unit was carrying when one of the player's units kills such a unit. Would be like Hellions getting minerals from flaming Drones- if I could just get that functionality going, I could get my more generalized plunder system working for my map where players control "combat workers" and combat has that extra weight of maybe being a bad idea.
I need to know this too. I need to be able to figure out the resources that a unit is carrying when it dies.
So far, no luck. There's a buff called Carry Mineral Field Minerals that is placed on a unit carrying minerals, but I don't think that the amount is tracked through that because the buff seems to have no effects other than to act as a status flag, and the max stacks of it are 1, so the game is not tracking held minerals by the # of stacks of it.
@Zetal
I think that Unit Resources is for resource nodes.
@YiffMaster:
I'm also having a hard time detecting if a unit carrying resources has died at all because the buff expires when the unit dies, so while other triggers return that it has the buff, death triggers return that it does not have the buff.
What it is NOT:
Behavior "Carry Harvestable Minerals" (purely aesthetic)
Unit property Resources (for mineral fields and vespene geysers)
Unit inventory
Unit cargo
What that leaves?
Charges in the apparently inaccessible ability (lol thxbliz)
Flags on units, which will probably never be accessible or editable.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I'm looking for a function that returns for example a MULE's currently held resources. Anyone know of a way to do this?
Thanks,
Yeah, this would be incredibly helpful and it's gotta be there. I mean, when an SCV returns to a Command Center, a function fires to transfer what the SCV is holding to the player's resource count, so there should be a way to get that mid-trigger and redirect it to something else. Should also be able to trigger the event itself differently, like when the gatherer dies.
Wondering how Blizzard will fix the MULE bug where the MULE can expire because of its timer mid-trip and like 30 minerals will just disappear from the game, and I figure that sounds like a script issue or something they could do in there. So we should be able to do something about it. But I just haven't found it yet, although I haven't gotten too deep into GalaxyScript yet either, still leafing through the triggers and new data editor.
Interested in a plundering system for my map though where a player gains the resources that a unit was carrying when one of the player's units kills such a unit. Would be like Hellions getting minerals from flaming Drones- if I could just get that functionality going, I could get my more generalized plunder system working for my map where players control "combat workers" and combat has that extra weight of maybe being a bad idea.
Condition -> Comparison -> Unit -> Unit Resources?
Haven't tested it, but it seems logical...
Not working =(
For a loaded MULE, that outputs 0 consistently. Event trigger is unit death and works fine (well, output so dur, lol).
Actually, here's all of that just in case:
Unit resources returns properly for a mineral field it seems, but there has to be some "resources carried" value somewhere...
Bump.
What it is NOT:
Behavior "Carry Harvestable Minerals" (purely aesthetic)
Unit property Resources (for mineral fields and vespene geysers)
Unit inventory
Unit cargo
What that leaves?
Charges in the apparently inaccessible ability (lol thxbliz)
Flags on units, which will probably never be accessible or editable.