Region/Trigger Help

Discussion in 'Starcraft 2 (SC2) Editor Help' started by DonMushroom, Mar 26, 2012.

  1. DonMushroom

    DonMushroom Member

    Hi :)

    I am looking to create a trigger region that gives the player minerals/gas when a unit (not stackable with multiple units) is inside it.

    So say a marine enters region. The player gets resources every 5 seconds. another marine enters the region and the player still gets 5 resources every second. Both marines leave player gets 0 resources per second.

    Been bugging me for a while :)
  2. Dave312

    Dave312 Censored for your safe viewing

    This trigger should do the trick. I have assumed that there are multiple players you want this trigger to work for and each player uses the same region. Post back if you have trouble making the trigger and I'll guide you through it or if one of my assumptions is wrong.

    • Income
      • Events
        • Timer - Every 5.0 seconds of Game Time
      • Local Variables
        • p = 0 <Integer>
      • Conditions
      • Actions
        • General - For each integer p from 1 to 12 with increment 1, do (Actions)
          • Actions
            • General - If (Conditions) then do (Actions) else do (Actions)
              • If
                • (Number of Living units in (Any units in (IncomeRegion) owned by player p matching Excluded: Missile, Dead, Hidden, with at most 1)) == 1
              • Then
                • Player - Modify player p Minerals: Add 5
              • Else
  3. DonMushroom

    DonMushroom Member

    Works perfectly thanks. :D

Share This Page