Trigger Problems and Triggers Interfering

wilze

Active Member
Reaction score
3
Hey, I have one of those long annoying posts, here it comes!

Why are these triggers not setting/adding the damage of all the units in UNIG_Group_A?

Trigger:
  • Set Damage
    • Events
      • Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
    • Conditions
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 1, 6)) Equal to (==) setdam
        • Then - Actions
          • Set INT_DamageSys_SETdamage = (Integer((Substring((Entered chat string), 8, 12))))
        • Else - Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 1, 6)) Equal to (==) adddam
        • Then - Actions
          • Set INT_DamageSys_ADDdamage = (Integer((Substring((Entered chat string), 8, 12))))
        • Else - Actions
      • Unit Group - Pick every unit in UNIG_Group_A and do (Actions)
        • Loop - Actions
          • Set UNI_DamageSys_Unit = (Picked unit)
          • Trigger - Run Set Damage System <gen> (checking conditions)

Trigger:
  • Set Damage System
    • Events
    • Conditions
    • Actions
      • -------- Required if unit does not have the dummy ability to begin with --------
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Level of ABIAR_DamageSys_Damage[1] for UNI_DamageSys_Unit) Equal to (==) 0
          • Then - Actions
            • Do Multiple ActionsFor each (Integer A) from 1 to INT_DamageSys_DigitCount, do (Actions)
              • Loop - Actions
                • Unit - Add ABIAR_DamageSys_Damage[(Integer A)] to UNI_DamageSys_Unit
          • Else - Actions
      • -------- Determine Current Damage --------
      • Set INT_DamageSys_CurrentDmg = 0
        • Do Multiple ActionsFor each (Integer A) from 1 to INT_DamageSys_DigitCount, do (Actions)
          • Loop - Actions
            • Set INT_DamageSys_CurrentDmg = (INT_DamageSys_CurrentDmg + (((Level of ABIAR_DamageSys_Damage[(Integer A)] for UNI_DamageSys_Unit) - 1) x (Integer((Power(10.00, ((Real((Integer A))) - 1.00)))))))
      • -------- Add Damage --------
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • INT_DamageSys_ADDdamage Greater than (>) 0
          • Then - Actions
            • Set INT_DamageSys_ADDdamage = (INT_DamageSys_ADDdamage + INT_DamageSys_CurrentDmg)
              • Do Multiple ActionsFor each (Integer A) from 1 to INT_DamageSys_DigitCount, do (Actions)
                • Loop - Actions
                  • Set INT_General = ((INT_DamageSys_ADDdamage mod (Integer((Power(10.00, (Real((Integer A)))))))) / (Integer((Power(10.00, ((Real((Integer A))) - 1.00))))))
                  • Unit - Set level of ABIAR_DamageSys_Damage[(Integer A)] for UNI_DamageSys_Unit to (INT_General + 1)
          • Else - Actions
            • Do Multiple ActionsFor each (Integer A) from 1 to INT_DamageSys_DigitCount, do (Actions)
              • Loop - Actions
                • Unit - Set level of ABIAR_DamageSys_Damage[(Integer A)] for UNI_DamageSys_Unit to 1
                • Set INT_General = ((INT_DamageSys_SETdamage mod (Integer((Power(10.00, (Real((Integer A)))))))) / (Integer((Power(10.00, ((Real((Integer A))) - 1.00))))))
                • Unit - Set level of ABIAR_DamageSys_Damage[(Integer A)] for UNI_DamageSys_Unit to (INT_General + 1)
      • Set INT_DamageSys_ADDdamage = 0
      • Set INT_DamageSys_SETdamage = 0


And once I test the above trigger in game it disables this system, why?

Trigger:
  • Set Life
    • Events
      • Player - Player 1 (Red) types a chat message containing setlife as A substring
    • Conditions
      • (Substring((Entered chat string), 1, 8)) Equal to (==) setlife
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units currently selected by Player 1 (Red)) and do (Actions)
        • Loop - Actions
          • Set INT_Temp_Integer_HP = (Integer((Substring((Entered chat string), 9, (Length of (Entered chat string))))))
          • Set UNI_Temp_Unit_A = (Picked unit)
          • Trigger - Run Set Health System <gen> (ignoring conditions)

Trigger:
  • Set Health System
    • Events
    • Conditions
    • Actions
      • Set INT_Temp_Integer_HP = (INT_Temp_Integer_HP - (Integer((Max life of UNI_Temp_Unit_A))))
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • INT_Temp_Integer_HP Greater than (>) 0
          • Then - Actions
            • Set INT_Loop_Integer = ((INT_Temp_Integer_HP - (INT_Temp_Integer_HP mod 100)) / 100)
              • Do Multiple ActionsFor each (Integer A) from 1 to INT_Loop_Integer, do (Actions)
                • Loop - Actions
                  • Unit - Add Max Life Modifier to UNI_Temp_Unit_A
                  • Unit - Set level of Max Life Modifier for UNI_Temp_Unit_A to 4
                  • Unit - Remove Max Life Modifier from UNI_Temp_Unit_A
            • Set INT_Temp_Integer_HP = (INT_Temp_Integer_HP mod 100)
            • Set INT_Loop_Integer = ((INT_Temp_Integer_HP - (INT_Temp_Integer_HP mod 10)) / 10)
              • Do Multiple ActionsFor each (Integer A) from 1 to INT_Loop_Integer, do (Actions)
                • Loop - Actions
                  • Unit - Add Max Life Modifier to UNI_Temp_Unit_A
                  • Unit - Set level of Max Life Modifier for UNI_Temp_Unit_A to 3
                  • Unit - Remove Max Life Modifier from UNI_Temp_Unit_A
            • Set INT_Temp_Integer_HP = (INT_Temp_Integer_HP mod 10)
              • Do Multiple ActionsFor each (Integer A) from 1 to INT_Temp_Integer_HP, do (Actions)
                • Loop - Actions
                  • Unit - Add Max Life Modifier to UNI_Temp_Unit_A
                  • Unit - Set level of Max Life Modifier for UNI_Temp_Unit_A to 2
                  • Unit - Remove Max Life Modifier from UNI_Temp_Unit_A
          • Else - Actions
            • Set INT_Temp_Integer_HP = (0 - INT_Temp_Integer_HP)
            • Set INT_Loop_Integer = ((INT_Temp_Integer_HP - (INT_Temp_Integer_HP mod 100)) / 100)
              • Do Multiple ActionsFor each (Integer A) from 1 to INT_Loop_Integer, do (Actions)
                • Loop - Actions
                  • Unit - Add Max Life Modifier to UNI_Temp_Unit_A
                  • Unit - Set level of Max Life Modifier for UNI_Temp_Unit_A to 7
                  • Unit - Remove Max Life Modifier from UNI_Temp_Unit_A
            • Set INT_Temp_Integer_HP = (INT_Temp_Integer_HP mod 100)
            • Set INT_Loop_Integer = ((INT_Temp_Integer_HP - (INT_Temp_Integer_HP mod 10)) / 10)
              • Do Multiple ActionsFor each (Integer A) from 1 to INT_Loop_Integer, do (Actions)
                • Loop - Actions
                  • Unit - Add Max Life Modifier to UNI_Temp_Unit_A
                  • Unit - Set level of Max Life Modifier for UNI_Temp_Unit_A to 6
                  • Unit - Remove Max Life Modifier from UNI_Temp_Unit_A
            • Set INT_Temp_Integer_HP = (INT_Temp_Integer_HP mod 10)
              • Do Multiple ActionsFor each (Integer A) from 1 to INT_Temp_Integer_HP, do (Actions)
                • Loop - Actions
                  • Unit - Add Max Life Modifier to UNI_Temp_Unit_A
                  • Unit - Set level of Max Life Modifier for UNI_Temp_Unit_A to 5
                  • Unit - Remove Max Life Modifier from UNI_Temp_Unit_A


I'm actually so lost that I don't know if I got everything necessary into this post. Super mega hug to anyone who helps me!
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
On the contrary, I believe there is quite a large portion of the community that uses Newgen, as inferred from the stickied threads in the forum.

@wilze: Do you mind uploading the map for a look? Personally I find problems more easily when I can see what's not working. :) Sorry if it's difficult, but I really can't make sense of the triggers as they are right now.
 

wilze

Active Member
Reaction score
3
I actually fixed the interfering part, now I just need to know why the setdamage trigger doesn't make everyone in the unit group get bonus damage. Download the map here.

And in my opinion Newgen improves the editor, so why not use it?
 

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
Reaction score
28
Because I've had troubles with it's 'test', it never works (I've tried what is says -rolls eyes- still doesn't work). It makes it more confusing than it is! (everything's muddled up)

Convert it to normal WE and it will be A-OK
 

wilze

Active Member
Reaction score
3
Well, you should take a look at the guides about testing maps in Newgen, if it doesn't work then you should reinstall Warcraft III. And I will obviously not be converting it to normal WE.
 

Inflicted

Currently inactive
Reaction score
63
1. I Don't understand this.
2. I don't use jass newgen
3. All of the above
4. All of the above
5. Most people don't use Jass Newgen.
What the hell? If you don't understand, don't try answer. Lol.

What are you trying to do in these triggers? Perhaps we can suggest an alternative solution.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top