• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Triggered item problems :(

Status
Not open for further replies.
Level 7
Joined
Mar 22, 2010
Messages
228
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..
 
Level 10
Joined
Jan 21, 2007
Messages
576
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?
 
Level 15
Joined
Oct 18, 2008
Messages
1,588
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:
Level 7
Joined
Mar 22, 2010
Messages
228
@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! :(
 
Level 7
Joined
Mar 22, 2010
Messages
228
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 :)
 
Level 9
Joined
Oct 11, 2009
Messages
477
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:
 
Level 7
Joined
Mar 22, 2010
Messages
228
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 ^^
 
Level 9
Joined
Oct 11, 2009
Messages
477
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.
 
Status
Not open for further replies.
Top