• 🏆 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!

Item Help

Status
Not open for further replies.
Level 17
Joined
Jun 2, 2009
Messages
1,141
how can i detect the owner of this item and how can i make this trigger working only target taking damage ?


  • Orb of Fire
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (((Attacking unit) has an item of type Orb of Fire) Equal to True) or ((((Attacking unit) has an item of type Firehand Gauntlets) Equal to True) or (((Attacking unit) has an item of type Orb of Flames |r|cff8b00ffUnique|r|n) Equal to True))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 20
        • Then - Actions
          • Unit - Create 1 Dummy Unit JFA for (Owner of (Attacking unit)) at (Position of (Attacked unit)) facing Default building facing degrees
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Orb of Fire to (Last created unit)
          • Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
          • Special Effect - Destroy (Last created special effect)
        • Else - Actions
          • Do nothing
 
Level 17
Joined
Jun 2, 2009
Messages
1,141
i created this but this don't work

  • Untitled Trigger 004
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Picked unit) to DamageGroup
          • Trigger - Add to Orb of Fire <gen> the event (Unit - (Picked unit) Takes damage)
  • Untitled Trigger 004 Copy
    • Events
      • Unit - A unit enters (Entire map)
    • Conditions
      • ((Entering unit) is in DamageGroup) Equal to False
    • Actions
      • Unit Group - Add (Entering unit) to DamageGroup
      • Trigger - Add to Orb of Fire <gen> the event (Unit - (Picked unit) Takes damage)
what's the problem ?

  • Orb of Fire
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (((Damage source) has an item of type Orb of Fire) Equal to True) or ((((Damage source) has an item of type Firehand Gauntlets) Equal to True) or (((Damage source) has an item of type Orb of Flames |r|cff8b00ffUnique|r|n) Equal to True))
          • (Random integer number between 1 and 100) Less than or equal to 20
        • Then - Actions
          • Unit - Create 1 Dummy Unit JFA for (Owner of (Damage source)) at (Position of (Damage source)) facing Default building facing degrees
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Orb of Fire to (Last created unit)
          • Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
          • Special Effect - Destroy (Last created special effect)
        • Else - Actions
          • Do nothing
 
Level 9
Joined
Oct 22, 2006
Messages
599
Trigger - Add to Orb of Fire <gen> the event (Unit - (Picked unit) Takes damage)
You don't pick any units... use (Triggering unit).

Special Effect - Destroy (Last created special effect)
You don't create any effects so this doesn't do anything, remove it. No leak is created by ordering a unit to cast a spell.
 
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,240
  • Untitled Trigger 004
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Temp_Group_1 = Units in (Playable map area)
      • Unit Group - Pick every unit in Temp_Group_1 and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Picked unit) to DamageGroup
          • Trigger - Add to Orb of Fire <gen> the event (Unit - (Picked unit) Takes damage)
      • Custom Script: call DestroyGroup(udg_Temp_Group_1)
  • Untitled Trigger 004 Copy
    • Events
      • Unit - A unit enters (Entire map)
    • Conditions
      • ((Entering unit) is in DamageGroup) Equal to False
    • Actions
      • Unit Group - Add (Entering unit) to DamageGroup
      • Trigger - Add to Orb of Fire <gen> the event (Unit - (Triggering unit) Takes damage)
  • Orb of Fire
    • Events
    • Conditions
      • (Random integer number between 1 and 100) Less than or equal to 20
      • OR
        • (Damage source) has an item of type Orb of Fire) Equal to True
        • (Damage source) has an item of type Orb of Flames |r|cff8b00ffUnique|r|n) Equal to True
        • (Damage source) has an item of type Firehand Gauntlets) Equal to True
    • Actions
      • Temp_Loc_1 = Position of (Damage source)
      • Unit - Create 1 Dummy Unit JFA for (Owner of (Damage source)) at Temp_Loc_1 facing Default building facing degrees
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Orb of Fire to (Last created unit)
      • Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
      • Custom Script: call RemoveLocation(udg_Temp_Loc_1)
 
Last edited:
  • (Random integer number between 1 and 100) Less than or equal to 20
Make sure that:
File => Preferences => Test Map => Use Fixed Random Seed is not ticked.
Otherwise it could be that when you click on Test Map the random integer is below 20 and because the option is enabled this integer will never change everytime you press Test Map.

What you also might check if your JFA Dummy Unit has mana for the skill and/or enough cast time? People sometimes forget about it.

Try the triggers from Maker, it they don't work the problems probably lies within your units/skills object data.
 
Status
Not open for further replies.
Top