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

Please Help My Trigger

Status
Not open for further replies.
Level 3
Joined
Feb 14, 2013
Messages
26
  • Events
    • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) belongs to an ally of Player12) Equal to True
      • ((Attacking unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Attacking unit)) Equal to Infernal
        • Then - Actions
          • Set Real = 6.00
          • Hashtable - Save Real as (Key damage) of (Key (Attacking unit)) in Hashtable
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Attacking unit)) Equal to Skeleton Warrior
            • Then - Actions
              • Set Real = 3.00
              • Hashtable - Save Real as (Key damage) of (Key (Attacking unit)) in Hashtable
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Unit-type of (Attacking unit)) Equal to Dreadlord
                      • (Unit-type of (Attacking unit)) Equal to Death Knight
                      • (Unit-type of (Attacking unit)) Equal to Lich
                      • (Unit-type of (Attacking unit)) Equal to Mini Lord
                • Then - Actions
                  • Set Real = (3.00 + ((Real((Agility of (Attacking unit) (Include bonuses)))) x 1.90))
                  • Hashtable - Save Real as (Key damage) of (Key (Attacking unit)) in Hashtable
                • Else - Actions
      • Set Real = 0.10
      • Hashtable - Save 0.00 as (Key Ctime) of (Key (Attacking unit)) in Hashtable
      • Hashtable - Save Real as (Key Mtime) of (Key (Attacking unit)) in Hashtable
      • Hashtable - Save Handle Of(Triggering unit) as (Key target) of (Key (Attacking unit)) in Hashtable
      • Unit Group - Add (Attacking unit) to Group_gold
purpose of this trigger is :
when an unit attacks on the enermies or tower of enermies, the unit will receive an amount of gold
but when gamer controls the unit pressing "S" (Stop) continiously the unit will not lose HP and still recieving gold.
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
  • Events
    • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) belongs to an ally of Player12) Equal to True
      • ((Attacking unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Attacking unit)) Equal to Infernal
        • Then - Actions
          • Set Real = 6.00
          • Hashtable - Save Real as (Key damage) of (Key (Attacking unit)) in Hashtable
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Attacking unit)) Equal to Skeleton Warrior
            • Then - Actions
              • Set Real = 3.00
              • Hashtable - Save Real as (Key damage) of (Key (Attacking unit)) in Hashtable
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Unit-type of (Attacking unit)) Equal to Dreadlord
                      • (Unit-type of (Attacking unit)) Equal to Death Knight
                      • (Unit-type of (Attacking unit)) Equal to Lich
                      • (Unit-type of (Attacking unit)) Equal to Mini Lord
                • Then - Actions
                  • Set Real = (3.00 + ((Real((Agility of (Attacking unit) (Include bonuses)))) x 1.90))
                  • Hashtable - Save Real as (Key damage) of (Key (Attacking unit)) in Hashtable
                • Else - Actions
      • Set Real = 0.10
      • Hashtable - Save 0.00 as (Key Ctime) of (Key (Attacking unit)) in Hashtable
      • Hashtable - Save Real as (Key Mtime) of (Key (Attacking unit)) in Hashtable
      • Hashtable - Save Handle Of(Triggering unit) as (Key target) of (Key (Attacking unit)) in Hashtable
      • Unit Group - Add (Attacking unit) to Group_gold
purpose of this trigger is :
when an unit attacks on the enermies or tower of enermies, the unit will receive an amount of gold
but when gamer controls the unit pressing "S" (Stop) continiously the unit will not lose HP and still recieving gold.

maybe because u dont removed from group?

where the trigger what remove unit from Group_gold?
 
Level 3
Joined
Feb 14, 2013
Messages
26
maybe because u dont removed from group?
where the trigger what remove unit from Group_gold?
  • GoldS3
    • Events
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order with no target
    • Conditions
      • ((Ordered unit) belongs to an ally of Player12) Equal to True
    • Actions
      • Unit Group - Remove (Ordered unit) from Group_gold
this is it
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
  • GoldS3
    • Events
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order with no target
    • Conditions
      • ((Ordered unit) belongs to an ally of Player12) Equal to True
    • Actions
      • Unit Group - Remove (Ordered unit) from Group_gold
this is it

then like others said use the DDS (i think bribe dds easy to implent also enough gui friendly too) then u add gold in set damage trigger and dont need unit group anymore and ur 1st trigger, just a if
 
Status
Not open for further replies.
Top