• 0

    posted a message on Trigger that executes when player is supply blocked

    @Jamesswart: Go

    Yeah but... it doesn't work anyway, right? Because you can issue the order to a Barracks to build a marine but have it be queued, and then you're not food blocked until you reach that point in the queue, by which time you might have built another supply depot.

    Posted in: Triggers
  • 0

    posted a message on Trigger that executes when player is supply blocked

    @Jamesswart: Go

    This is one of the solutions I considered. It's tricky, since the player can issue the order and result in a unit being queued but not built, so they might not be food blocked. Also, I'd have to make a different case for every type of unit that can increase your food. I'm willing to do that, but as a programmer myself it feels... icky.

    Posted in: Triggers
  • 0

    posted a message on Trigger that executes when player is supply blocked

    @tFighterPilot: Go

    Clever! So something like:

    • Every time a unit's training (or building, or morphing, or warping in) progress begins, update a variable containing the current supply count
    • If this variable is already equal to the current supply count, execute my trigger

    Right? That sounds good for buildings that work like barracks. Larvae, corruptor->BL morphs, and warp-ins from warp gates will have to be solved differently though.

    Posted in: Triggers
  • 0

    posted a message on Trigger that executes when player is supply blocked

    I'm trying to make a training map, and I want a trigger to execute whenever the player tries to create a unit but can't because he doesn't have enough supply.

    Is there a simple way to execute a trigger when the player gets a "not enough supply" error? I have tried several approaches so far but none of them have worked, and I don't see an obvious corresponding event in the list.

    If there isn't a simple way, what approach would you take? I've tried a few different approaches, but each has either not worked, or has required making a separate case for every unit type a player could build (and probably wouldn't have worked anyway).

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