Supply Block Event

Posts: 19
I cannot seem to find a way to monitor if a player supply blocks.

The closest I have come is monitoring when a player's used supply changes, and then if that supply is equal to the current made supply, then wait a few seconds (I currently wait 5 game seconds). If they are still maxed on supply, then consider it a supply block. I also disable this trigger for the first 210 game seconds to ignore initial supply blocks (ex: making an overlord at 9 would yield a supply block).

This has a few problems. One, it doesn't accurately monitor if the player attempts to make a unit while they are at max supply. I know of several build orders that would put a player at max supply used. These would be considered supply blocks under my current structure, and lead to negative effects.

I am really looking for an event that fires when a user tries to make a unit but cannot because of their current supply max.

The things I have tried:
  • TriggerAddEventUnitTrainProgress with c_unitProgressStageComplete, c_unitProgressStageCancelled, c_unitProgressStageStarted ----- None of these events fire if they unit is never allowed to begin.
  • TriggerAddEventPlayerPropChange with c_playerPropSuppliesUsed, c_playerPropSuppliesMade, c_playerPropSuppliesLimit ----- this is the current event i have.
Reply Quote
Posts: 605
If the training icon is in the queue, and is blocked by the 200 max limit, then it would still trigger the Unit Use Ability event, you can capture its Execute stage.
Edited by Renee on 11/29/2012 8:48 AM PST
Reply Quote
Posts: 19
I'm not afraid of the 200 limit. In fact, it is the only time in which I would not fire this trigger.

I am concerned when the user attempts to make a unit but is at their current maximum, for example 18/18 or 42/42.

I think you have put me on a path that may yield some fruit. I could possibly monitor any unit attempting to make units. In this manner i would have to check against a unit being any that can train (larva, nexus, hatchery, barracks, warp gate, etc). From there I can determine if it would fail by checking supply requirement of the triggering unit against the current supply made versus supply used.
Reply Quote
Posts: 3
I'm having this exact problem so if you figure out how to fix it please be sure to post it here as an update :)
Reply Quote
Posts: 3
Check out this trigger if you haven't already figured out a solution. I worked it out from what ColdLogic said and was able to spawn banelings until the player was supply capped.

Player 1 Right/Top Baneling Spawn
--------Timer - Every 5.0 seconds of Game Time
----Local Variables
--------General - If (Conditions) then do (Actions) else do (Actions)
----------------(Player 1 Supplies Made) > (Player 1 Supplies Used)
----------------(Player 1 Supplies Used) < (Player 1 Supplies Limit)
----------------Unit - Create 1 Baneling for player 1 at (Center of Player 1 Right/Top Baneling Spawn) using default facing (No Options)
----------------UI - Display "Max Supply Reached" for (Allies of player 1) to Subtitle area
Edited by Vincent on 12/2/2012 4:34 PM PST
Reply Quote
Posts: 16
I made it a bit simpler.

| |_Player - Player 1 Supplies Used changes
|_Local Varibles
| |_(Player (Triggering player) Supplies Used) >=(Player(Triggering player) Supplies Made)
|_*Any Action you want*
Edited by Maelstromage on 2/3/2014 10:34 AM PST
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Explain (256 characters max)