• 0

    posted a message on Any way to get a unit's held resources?

    Not working =(

    Set Variable
        Variable: unitMinerals
        Value: Unit Resources
            Unit: Triggering Unit
            Current: Current
    
    Debug Message
        Text: Convert Integer To Text
            Value: unitMinerals
        Type: Type 1
        UI: Do
    

    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:

        Events
            Unit - Any Unit dies
        Local Variables
            unitMinerals = 0 <Integer>
        Conditions
            (Unit type of (Triggering unit)) == MULE
    
    Posted in: Miscellaneous Development
  • 0

    posted a message on Any way to get a unit's held resources?

    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.

    Posted in: Miscellaneous Development
  • To post a comment, please or register a new account.