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. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Choose your ride to damnation in the 5th Special Effect Contest Poll.
    Dismiss Notice
  5. The winners of the 13th Techtree Contest have been announced!
    Dismiss Notice
  6. The 13th Music Contest Poll is up! Vote for the best tracks in this symphony of frost and flame.
    Dismiss Notice
  7. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  8. 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.

Triggered item problems :(

Discussion in 'Triggers & Scripts' started by machris13, Apr 8, 2010.

  1. machris13

    machris13

    Joined:
    Mar 22, 2010
    Messages:
    227
    Resources:
    0
    Resources:
    0
    i have two problems here...
    i want an item that if carried it can detect enemy heroes that has HP below 30%..and if it detects, i want its movespeed to increase by 100. i just dont know how to start or i just dont have an idea about it...please help me about this..

    and the second one i want an item that can can block an amount of damage for a chance..i cant find it in abilities, so i guess its in triggers..i dont know how to do it..please dont send me vJass bcoz i dont use it..GUI would do..please help..
     
  2. Gost

    Gost

    Joined:
    Jan 21, 2007
    Messages:
    568
    Resources:
    0
    Resources:
    0
    Don't have warcraft installed atm so I can't help you with your first problem, especially if it has to be gui.

    But the second one is one of the night-elf mountain giant's abilities, hardened skin/resistant skin?
     
  3. Kanadaj

    Kanadaj

    Joined:
    Oct 18, 2008
    Messages:
    1,584
    Resources:
    2
    Icons:
    2
    Resources:
    2
    Gost: That's right :D And I'm making the first one, althought I think there is an item but IDK :D
    EDIT: So the first one detects the ENEMY hero's life and boosts you? :D
    EDIT2: Another question: the buff should have an expiration timer or just remove when you get further from the enemy?
     
    Last edited: Apr 8, 2010
  4. cl0s3dy

    cl0s3dy

    Joined:
    Apr 10, 2009
    Messages:
    96
    Resources:
    3
    Maps:
    3
    Resources:
    3
    I'll check the first one as soon as I get some free time and also the second one will be done with a trigger and you can also add effects or something..
     
  5. machris13

    machris13

    Joined:
    Mar 22, 2010
    Messages:
    227
    Resources:
    0
    Resources:
    0
    @Kanadaj:

    Absolutely..it was a skill of Bloodseeker from dota..i wanted an item version of it.

    @Gost:

    Thanks gost for the skill..i'll try it if it works.

    actually i already finished the first onw but it leaks..it can only detect if the enemy hero is in visibility on map or something not in black ones (i dont know what that is called actually but its not invisibile what i ment). But whenever i get further the target, the effects wont be destroyed...i tried custom script and wrote call DestroyEffectsBJ( udg_(the variable) )..but still SFX wont disappear...i hate it! :(
     
  6. Dark_Axl

    Dark_Axl

    Joined:
    Dec 12, 2007
    Messages:
    473
    Resources:
    2
    Maps:
    1
    Spells:
    1
    Resources:
    2
    about your second ability...
    there is actually an ability that works just like that, its called Hardened Skin from the Mountain Giant unit, the only drawback is that it can only detect damage from attack...
     
  7. machris13

    machris13

    Joined:
    Mar 22, 2010
    Messages:
    227
    Resources:
    0
    Resources:
    0
    thanks guys.. i finally found out the second one..thanks to all...i have a problem also in XP's..its there in world edit help zone i guess thats the name..you can answer if you want :)
     
  8. sephiroth1234

    sephiroth1234

    Joined:
    Oct 11, 2009
    Messages:
    455
    Resources:
    0
    Resources:
    0
    For the movement speed issue, you need 3 variables, an Arrayed Point variable, a Unit variable and a Real variable. Also you need at least 2 triggers for it.

    The first trigger is:

    • Wounded Unit Chaser
      • Events
        • Time - Every 1.00 seconds of game time
      • Conditions
      • Actions
        • Unit Group - Pick every unit in (Units in (Entire map) matching (((Matching unit) has an item of type Tome of Experience) Equal to True)) and do (Actions)
          • Loop - Actions
            • Set Item_Carrier = (Picked unit)
            • Unit Group - Remove all units from (Last created unit group)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Number of units in (Units in (Entire map) matching ((Percentage life of (Matching unit)) Less than or equal to 30.00))) Not equal to 0
          • Then - Actions
            • Trigger - Run Wounded Unit Chaser 2 <gen> (ignoring conditions)
            • Unit Group - Pick every unit in (Units in (Entire map) matching ((Percentage life of (Matching unit)) Less than or equal to 30.00)) and do (Actions)
              • Loop - Actions
                • Set Point[(Player number of (Owner of Item_Carrier))] = (Position of (Picked unit))
                • For each (Integer A) from 1 to 12, do (Actions)
                  • Loop - Actions
                    • Visibility - Create an initially Enabled visibility modifier for (Owner of Item_Carrier) emitting Visibility from Point[(Integer A)] to a radius of 500.00
                    • Custom script: call RemoveLocation(udg_Point[GetForLoopIndexA])
          • Else - Actions



    And the second one is:

    • Wounded Unit Chaser 2
      • Events
      • Conditions
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Number of units in (Units in (Entire map) matching ((Percentage life of (Matching unit)) Less than or equal to 30.00))) Not equal to 0
          • Then - Actions
            • Unit - Set Item_Carrier movement speed to ((Current movement speed of Item_Carrier) + 100.00)
          • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Number of units in (Units in (Entire map) matching ((Percentage life of (Matching unit)) Less than or equal to 30.00))) Equal to 0
          • Then - Actions
            • Unit - Set Item_Carrier movement speed to ((Current movement speed of Item_Carrier) - 100.00)
          • Else - Actions


    I hope that helped...:grin::grin::grin:
     
  9. machris13

    machris13

    Joined:
    Mar 22, 2010
    Messages:
    227
    Resources:
    0
    Resources:
    0
    well...i guess that helped be :)
    but its too confusing :(

    my first trigger (event) is when a unit acquires an item..
    and in condition is the item and is equal to hero.

    well...nevermind..i'll follow yours ^^
     
  10. sephiroth1234

    sephiroth1234

    Joined:
    Oct 11, 2009
    Messages:
    455
    Resources:
    0
    Resources:
    0
    I used Hero Boolean Comparison because only heroes can only use items and heroes should always correspond to the event not like normal units' inventory in which they can carry items but is unusable.
     
  11. machris13

    machris13

    Joined:
    Mar 22, 2010
    Messages:
    227
    Resources:
    0
    Resources:
    0
    do not get this...
     

    Attached Files:

  12. Pharaoh_

    Pharaoh_

    Joined:
    Nov 6, 2008
    Messages:
    8,128
    Resources:
    11
    Icons:
    3
    Skins:
    1
    Spells:
    6
    Tutorials:
    1
    Resources:
    11
    Although it's not flawless, here is the general outlook of the triggers you'd need. Since you use jass, create a periodic timer instead of a periodic event.
    View attachment Blood Drop.w3x