1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need Help Making Trigger

Discussion in 'Custom Ideas for maps' started by Revenant, Sep 25, 2018.

  1. Revenant
    Offline

    Revenant

    Messages:
    9
    Trophy Points:
    3
    Hello everyone!

    I'm currently in the works of making a small custom map - it's a 1v1 melee map but using my inspiration from all the mass war maps I've experienced, I wanted to add a couple of little quirks.

    Unfortunately I am not ready to share the map yet, but I need help with a trigger. I have a neutral shipyard located on the map, and I want to make it so that when it "dies," it changes ownership from neutral to the player attacking it. I've been tinkering with the triggers some for a while, but my lack of experience and knowledge has left me in a bit of a rut. Can someone help me out?
  2. SvnmS
    Offline

    SvnmS Brigand Map Maker

    Messages:
    1,831
    Trophy Points:
    150
    Use the event :
    "specific unit (your shipyard in this case) takes damage"
    condition :
    "current hp of triggering unit < damage taken"
    actions :
    "change ownership of triggering unit to owner of(damage source)"
    "change hp of triggering unit to 100%"
    • Like Like x 1
  3. Revenant
    Offline

    Revenant

    Messages:
    9
    Trophy Points:
    3
    Tried it out and it didn't work. Well, the reset to 100% worked, but not the change. Does the shipyard need to be Neutral Hostile, or can it work for Neutral Passive?

    And for clarification's sake, does "owner of (damage source)" mean the same as "owner of (attacking unit)"?
  4. SvnmS
    Offline

    SvnmS Brigand Map Maker

    Messages:
    1,831
    Trophy Points:
    150
    No, owner of attacking unit works when you use "unit attacks" event.
    And it happens immediately after the unit starts attacking, before the attack even lands.
    Damage source is for the "unit takes damage" event.
    Make sure you are using damage source.
    • Like Like x 1
  5. Revenant
    Offline

    Revenant

    Messages:
    9
    Trophy Points:
    3
    My name is officially the Blind Novice.

    Thank you much!