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 havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. 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] Targeted Unit/Cast

Discussion in 'Triggers & Scripts' started by Atticus, Mar 21, 2009.

  1. Atticus

    Atticus

    Joined:
    Feb 7, 2009
    Messages:
    162
    Resources:
    0
    Resources:
    0
    My trigger is not working. This portion...
    • Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing (3.00 x ((Percentage mana of Dummy Unit(Magic) 0000 <gen>) x 0.10)) damage of attack type Spells and damage type Fire


    Here is the entire trigger if you need it.
    • ManaWipe
      • Events
        • Unit - A unit Begins casting an ability
      • Conditions
        • (Ability being cast) Equal to ManaWipe
      • Actions
        • Floating Text - Create floating text that reads (100 + %) above Muradin Bronzebeard 0002 <gen> with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        • Wait 1.00 seconds
        • Trigger - Turn on Damage Increase <gen>
        • Wait 6.00 seconds
        • Trigger - Turn off Damage Increase <gen>
        • Floating Text - Destroy (Last created floating text)
        • Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing (3.00 x ((Percentage mana of Dummy Unit(Magic) 0000 <gen>) x 0.10)) damage of attack type Spells and damage type Fire
        • Unit - Set mana of Dummy Unit(Magic) 0000 <gen> to 0.00


    But the damage wont go to the unit having the ability cast on them. What am I doing wrong /cry +rep for help
     
  2. Just_Spectating

    Just_Spectating

    Joined:
    May 16, 2007
    Messages:
    7,023
    Resources:
    46
    Models:
    11
    Icons:
    9
    Skins:
    26
    Resources:
    46
    Use the event, Starts the effect of an ability all the time. Its the most efficient.

    Instead of casting unit, Use triggering unit

    but also those waits will screw it up.
     
  3. Atticus

    Atticus

    Joined:
    Feb 7, 2009
    Messages:
    162
    Resources:
    0
    Resources:
    0
    I changed everything you told me to.

    Its not the person casting its the person having it cast on. He doesn't take damage.
     
  4. Just_Spectating

    Just_Spectating

    Joined:
    May 16, 2007
    Messages:
    7,023
    Resources:
    46
    Models:
    11
    Icons:
    9
    Skins:
    26
    Resources:
    46
    yes because your waits lose the information of what is being targeted.
     
  5. Atticus

    Atticus

    Joined:
    Feb 7, 2009
    Messages:
    162
    Resources:
    0
    Resources:
    0
    Are you serious? Can it be done after 1 wait or no waits at all?
     
  6. Just_Spectating

    Just_Spectating

    Joined:
    May 16, 2007
    Messages:
    7,023
    Resources:
    46
    Models:
    11
    Icons:
    9
    Skins:
    26
    Resources:
    46
    waits generally screw alot of things up :/
     
  7. Atticus

    Atticus

    Joined:
    Feb 7, 2009
    Messages:
    162
    Resources:
    0
    Resources:
    0
    If you're at all curious...I think I fixed it...I think.

    • ManaWipe
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • (Ability being cast) Equal to ManaWipe
      • Actions
        • Floating Text - Create floating text that reads (100 + %) above Muradin Bronzebeard 0002 <gen> with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        • Trigger - Turn on Damage Increase <gen>
        • Unit - Cause (Triggering unit) to damage circular area after 6.00 seconds of radius 15.00 at (Position of (Target unit of ability being cast)), dealing (3.00 + ((Percentage mana of Dummy Unit(Magic) 0000 <gen>) / 8.00)) damage of attack type Spells and damage type Normal
        • Wait 6.00 seconds
        • Trigger - Turn off Damage Increase <gen>
        • Floating Text - Destroy (Last created floating text)
        • Unit - Set mana of Dummy Unit(Magic) 0000 <gen> to 0.00




    EDIT: Nvm that trigger above did not work...however I just used a variable to set the unit within a region to the unit thats going to take the damage. Thanks for you're help..REP+
    Then I have a trigger which moves region to position of unit every 0.1 sec...
     
  8. Maximilianx

    Maximilianx

    Joined:
    Oct 14, 2008
    Messages:
    334
    Resources:
    0
    Resources:
    0
    Casting Unit will never work after a wait, how ever Triggering Unit will.
     
  9. DenZel94

    DenZel94

    Joined:
    Jun 4, 2006
    Messages:
    127
    Resources:
    5
    Maps:
    3
    Tutorials:
    2
    Resources:
    5
    If you are planning to have a trigger that doesn't use "Triggering unit" and has waits, you'd have to set the unit into a variable and use that variable for the actions.
     
  10. Just_Spectating

    Just_Spectating

    Joined:
    May 16, 2007
    Messages:
    7,023
    Resources:
    46
    Models:
    11
    Icons:
    9
    Skins:
    26
    Resources:
    46
    oh. thats a useful tip.