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. Ride into the sunset with the 32nd Modeling Contest.
    Dismiss Notice
  4. This adventure has come to an end. Congratulate our heroes in the 16th Mini Mapping Contest Results.
    Dismiss Notice
  5. From the gates of hell, the 5th Special Effect Contest Results have emerged.
    Dismiss Notice
  6. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  7. 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.

Trigger for living units on damage upon blighted ground.

Discussion in 'World Editor Help Zone' started by TheFifthHorseman, May 3, 2017.

  1. TheFifthHorseman

    TheFifthHorseman

    Joined:
    Sep 24, 2015
    Messages:
    9
    Resources:
    0
    Resources:
    0
    Hi. I am in the middle of making a map called The Desolation of the Scourge and am reaching the final stages of development. One of the aspects of the map is to make human units take damage while on blighted ground. I have tried to give them a negative health regeneration while on blight but it seems that it disables healing regeneration such as healing wards and fountain of health, which I assume is based on there initial regeneration.
    So here is my request. I would love someone to help me create a trigger in GUI or Jass that will allow me to make all living units take damage while on blighted ground. If anyone can help me post on the thread or Personal Message me. I would be grateful and you will receive special credits.
     
  2. Marcos_M

    Marcos_M

    Joined:
    Jan 23, 2011
    Messages:
    347
    Resources:
    0
    Resources:
    0
    How about using the damage aura from the tornado? You just change the objectives of the aura. You could create a dummy on the center of the blight with the aura.
    If you have too many interactions with the blight you can detect it with triggers. Just setting a group with the humans units, then checking if the terrain is blighted and causing damage or adding the aura
     
  3. LordDz

    LordDz

    Joined:
    May 11, 2007
    Messages:
    4,305
    Resources:
    0
    Resources:
    0
    One way you can test before doing all of this, does adding the ring of regeneration ability to a human unit (while keeping the negative reg on blight) solve this?
    Otherwise, pseudo code cuz I'm lazy:

    ----Trigger 1
    unit enters entire map
    check if unit is human, ground unit and organic

    Add it to "HumanUnits"

    ----Trigger 2
    Every 0.25 second
    pick every unit in HumanUnits
    set TempPoint1 = position of picked unit
    Check if terrain at temppoint1 == blight!
    if true: set picked unit health -= 2
    cleanup tempPoint1

    ----Trigger 3
    A unit dies
    Check if unit is in HumanUnits
    Remove unit from HumanUnits
     
  4. TheFifthHorseman

    TheFifthHorseman

    Joined:
    Sep 24, 2015
    Messages:
    9
    Resources:
    0
    Resources:
    0

    Thanks for the suggestion ill give both a try and see what happens.