1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Lead your forces to battle in the 15th Techtree Contest. The call is yours, commander!
    Dismiss Notice
  4. The reforging of the races is complete. Come see the 14th Techtree Contest Results.
    Dismiss Notice
  5. It's time to choose your horse in the race - the 32nd Modeling Contest Poll is up!
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Remove Blight

Discussion in 'Requests' started by TaShadan, Sep 7, 2012.

  1. TaShadan

    TaShadan

    Joined:
    Jul 2, 2008
    Messages:
    1,151
    Resources:
    0
    Resources:
    0
    I need a trigger that removes blight after a building that creates blight dies.
     
  2. Maestros

    Maestros

    Joined:
    Oct 26, 2008
    Messages:
    373
    Resources:
    1
    Spells:
    1
    Resources:
    1
    • Melee Initialization
      • Events
        • Unit - A unit Dies
      • Conditions
        • (Unit-type of (Triggering unit)) Equal to Black Citadel
      • Actions
        • Environment - Remove Blight for (Owner of (Triggering unit)) from (Position of (Triggering unit)) to a radius of 2000.00


    You can modify the radius, and may i suggest setting a unit group in some other trigger, adding in that unitgroup every building that creates blight, and then have the condition,

    • ((Triggering unit) is in (Units in (YourUnitGroup))) Equal to True


    And then remove it from the unit group.
     
  3. TaShadan

    TaShadan

    Joined:
    Jul 2, 2008
    Messages:
    1,151
    Resources:
    0
    Resources:
    0
    i tried it but its not working :(

    maybe i should use a dummy unit and cast remove blight on the dieing unit position?
     
  4. Maestros

    Maestros

    Joined:
    Oct 26, 2008
    Messages:
    373
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Can you post your triggers?
     
  5. TaShadan

    TaShadan

    Joined:
    Jul 2, 2008
    Messages:
    1,151
    Resources:
    0
    Resources:
    0
    deleted them already but i had exactly what you posted
     
  6. Maestros

    Maestros

    Joined:
    Oct 26, 2008
    Messages:
    373
    Resources:
    1
    Spells:
    1
    Resources:
    1
    :vw_sleep:

    That was an example..

    First of, what units you have to create blight? Only undead buildings or others too?

    And second of all, are those buildings that generate blight on the map, or they can be built by a player or AI later on?
     
  7. TaShadan

    TaShadan

    Joined:
    Jul 2, 2008
    Messages:
    1,151
    Resources:
    0
    Resources:
    0
    only undead (ziggurat and necropolis with all stages)
    they can be built (its melee)
     
  8. Maestros

    Maestros

    Joined:
    Oct 26, 2008
    Messages:
    373
    Resources:
    1
    Spells:
    1
    Resources:
    1
    In that case, (if only those two are the buildings, then its easy to do this)


    • Melee Initialization
      • Events
        • Unit - A unit Dies
      • Conditions
        • Or - Any (Conditions) are true
          • Conditions
            • (Unit-type of (Triggering unit)) Equal to Necropolis
            • (Unit-type of (Triggering unit)) Equal to Halls of the Dead
            • (Unit-type of (Triggering unit)) Equal to Black Citadel
            • (Unit-type of (Triggering unit)) Equal to Ziggurat
            • (Unit-type of (Triggering unit)) Equal to Spirit Tower
            • (Unit-type of (Triggering unit)) Equal to Nerubian Tower
      • Actions
        • Set TempLoc = (Position of (Triggering unit))
        • Environment - Remove Blight for (Owner of (Triggering unit)) from TempLoc to a radius of 2000.00
        • Custom script: call RemoveLocation(udg_TempLoc)
     
  9. Elfansoer

    Elfansoer

    Joined:
    Aug 26, 2012
    Messages:
    122
    Resources:
    0
    Resources:
    0
    How about this?
    • Melee Initialization
      • Events
        • Unit - A unit Dies
      • Conditions
        • Or - Any (Conditions) are true
          • Conditions
            • Level of (Blight growth large) for triggering unit not equal to 0
            • Level of (Blight growth small) for triggering unit not equal to 0
      • Actions
        • Set TempLoc = (Position of (Triggering unit))
        • Environment - Remove Blight for (Owner of (Triggering unit)) from TempLoc to a radius of 2000.00
        • Custom script: call RemoveLocation(udg_TempLoc)

    (well, just a refined form of Maestros's...)
     
  10. TaShadan

    TaShadan

    Joined:
    Jul 2, 2008
    Messages:
    1,151
    Resources:
    0
    Resources:
    0
    thx guys is works fine :)
    is there a way to have it beeing removed slowly over time?
     
  11. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,978
    Resources:
    17
    Spells:
    17
    Resources:
    17
    What do you mean "over time" ?
    Like, the Blight slowly fading out of sight and turns to normal ground ?
    No.