Matching Destructible Conditional?

Bird

Ultra Cool Member
Reaction score
29
Anything wrong with this? I am putting my attacker near appropriate trees, then damaging other units, but the value of S_INS_Int is always 0 (this is checked later on).

Anything wrong with this block of code?

Trigger:
  • Set S_INS_Int = 0
    • Set S_INS_Int = (S_INS_Int + (Number of units in (Units within 600.00 of (Position of (Damage source)) matching ((Destructible-type of (Matching destructible)) Equal to Summer Tree Wall))))
    • Set S_INS_Int = (S_INS_Int + (Number of units in (Units within 600.00 of (Position of (Damage source)) matching ((Destructible-type of (Matching destructible)) Equal to Ashenvale Tree Wall))))
    • Set S_INS_Int = (S_INS_Int + (Number of units in (Units within 600.00 of (Position of (Damage source)) matching ((Destructible-type of (Matching destructible)) Equal to Ashenvale Canopy Tree))))
 

Wratox1

Member
Reaction score
22
Anything wrong with this? I am putting my attacker near appropriate trees, then damaging other units, but the value of S_INS_Int is always 0 (this is checked later on).

Anything wrong with this block of code?

Trigger:
  • Set S_INS_Int = 0
    • Set S_INS_Int = (S_INS_Int + (Number of units in (Units within 600.00 of (Position of (Damage source)) matching ((Destructible-type of (Matching destructible)) Equal to Summer Tree Wall))))
    • Set S_INS_Int = (S_INS_Int + (Number of units in (Units within 600.00 of (Position of (Damage source)) matching ((Destructible-type of (Matching destructible)) Equal to Ashenvale Tree Wall))))
    • Set S_INS_Int = (S_INS_Int + (Number of units in (Units within 600.00 of (Position of (Damage source)) matching ((Destructible-type of (Matching destructible)) Equal to Ashenvale Canopy Tree))))

how can you count number of units equal to a destructible?:confused:
 

Bird

Ultra Cool Member
Reaction score
29
^ That is a good question, but it is there, as an option. But it does not appear to work. How else would I count destructibles?
 

Bird

Ultra Cool Member
Reaction score
29
Screen shot shows you that it is running fine... but not counting trees.
Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Level of Hinterlore (PASS) for (Damage source)) Greater than 0
    • Then - Actions
      • Set S_INS_Real = ((Damage taken) x 0.10)
      • Set S_INS_Int = 0
      • Set S_INS_Int = (S_INS_Int + (Number of units in (Units within 600.00 of (Position of (Damage source)) matching ((Destructible-type of (Matching destructible)) Equal to Summer Tree Wall))))
      • Quest - Display to (All players) the Quest Update message: (String(S_INS_Int))
      • Set S_INS_Int = (S_INS_Int + (Number of units in (Units within 600.00 of (Position of (Damage source)) matching ((Destructible-type of (Matching destructible)) Equal to Ashenvale Tree Wall))))
      • Quest - Display to (All players) the Quest Update message: (String(S_INS_Int))
      • Set S_INS_Int = (S_INS_Int + (Number of units in (Units within 600.00 of (Position of (Damage source)) matching ((Destructible-type of (Matching destructible)) Equal to Ashenvale Canopy Tree))))
      • Quest - Display to (All players) the Quest Update message: (String(S_INS_Int))
 

Attachments

  • hinterlore.jpg
    hinterlore.jpg
    162.1 KB · Views: 78

Azlier

Old World Ghost
Reaction score
461
>how can you count number of units equal to a destructible?

Eeexcellent point.

Isn't there a (Number of destructibles in...) type action?

I'm fairly sure that there is.
 

Azlier

Old World Ghost
Reaction score
461
Well, you can increase a variable for every destructable in a circle.

Note that this will leak horrendously unless you move onto Jass.
 

Bird

Ultra Cool Member
Reaction score
29
Ok, good call... works! (rep)
Trigger:
  • Destructible - Pick every destructible within 640.00 of (Position of (Damage source)) and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Destructible-type of (Picked destructible)) Equal to Summer Tree Wall
              • (Destructible-type of (Picked destructible)) Equal to Ashenvale Tree Wall
              • (Destructible-type of (Picked destructible)) Equal to Ashenvale Canopy Tree
        • Then - Actions
          • Set S_INS_Int = (S_INS_Int + 1)
        • Else - Actions
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top