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

[Solved] Part of trigger doesn't fire

Status
Not open for further replies.
Level 8
Joined
Apr 23, 2010
Messages
312
Everything but the game messages work, even though they should since they're not in an ITE. Can someone please explain to me why it won't display the game message?

  • Vote Finished
    • Events
      • Time - TempTimer expires
    • Conditions
    • Actions
      • Countdown Timer - Destroy Timer_Window
      • -------- ------------------------------------------ EXPERIENCE RATE ------------------------------------------ --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • V_XP_Count[1] Greater than or equal to V_XP_Count[2]
              • V_XP_Count[1] Greater than or equal to V_XP_Count[3]
        • Then - Actions
          • Set TempReal = 1.00
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • V_XP_Count[2] Greater than or equal to V_XP_Count[1]
                  • V_XP_Count[2] Greater than or equal to V_XP_Count[3]
            • Then - Actions
              • Set TempReal = 5.00
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • V_XP_Count[3] Greater than or equal to V_XP_Count[1]
                      • V_XP_Count[3] Greater than or equal to V_XP_Count[2]
                • Then - Actions
                  • Set TempReal = 9.00
                • Else - Actions
      • -------- ------------------------------------------ TROOP COUNT ------------------------------------------ --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • V_TC_Count[1] Greater than or equal to V_TC_Count[2]
              • V_TC_Count[1] Greater than or equal to V_TC_Count[3]
              • V_TC_Count[1] Greater than or equal to V_TC_Count[4]
        • Then - Actions
          • Set TempInteger = 1000
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • V_TC_Count[2] Greater than or equal to V_TC_Count[1]
                  • V_TC_Count[2] Greater than or equal to V_TC_Count[3]
                  • V_TC_Count[2] Greater than or equal to V_TC_Count[4]
            • Then - Actions
              • Set TempInteger = 2000
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • V_TC_Count[3] Greater than or equal to V_TC_Count[1]
                      • V_TC_Count[3] Greater than or equal to V_TC_Count[2]
                      • V_TC_Count[3] Greater than or equal to V_TC_Count[4]
                • Then - Actions
                  • Set TempInteger = 3000
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • And - All (Conditions) are true
                        • Conditions
                          • V_TC_Count[4] Greater than or equal to V_TC_Count[1]
                          • V_TC_Count[4] Greater than or equal to V_TC_Count[2]
                          • V_TC_Count[4] Greater than or equal to V_TC_Count[3]
                    • Then - Actions
                      • Set TempInteger = 6000
                    • Else - Actions
      • Set Troops_Alliance = TempInteger
      • Set Troops_Horde = TempInteger
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row (MultiBoard_Players + 3) to (String(Troops_Alliance))
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row (MultiBoard_Players + 4) to (String(Troops_Horde))
      • Set TempPlayerGroup = (All players matching (((Picked player) slot status) Equal to Is playing))
      • Player Group - Pick every player in TempPlayerGroup and do (Actions)
        • Loop - Actions
          • Hero - Make (Picked player) Heroes gain TempReal% experience from future kills
      • Custom script: call DestroyForce(udg_TempPlayerGroup)
      • Set TempInteger2 = (Integer(TempReal))
      • Game - Display to (All players) for 20.00 seconds the text: |c00FF0303Voted Set...
      • Game - Display to (All players) for 20.00 seconds the text: |c00FFFC01---------...
      • Game - Display to (All players) for 20.00 seconds the text: (|c00FEBA0EXP Rate: |r + (String(TempInteger2)))
      • Game - Display to (All players) for 20.00 seconds the text: (|c00FEBA0ETroop Count: |r + (String(TempInteger)))
 

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,464
If the message does nothing at the top of the trigger, then the variable that I mentioned is either getting destroyed or emptied. At the top of the trigger, put this custom script in:

JASS:
call BJDebugMsg(I2S(GetHandleId(bj_FORCE_ALL_PLAYERS)))

If it displays a non-zero number, then do this:

  • Player Group - Pick all players in (All Players) and do
    • Loop - Actions
      • Custom script: call BJDebugMsg("Player: " + I2S(GetPlayerId(GetEnumPlayer())))
If that doesn't show any player number(s), some script in your map is emptying that player group.
 
Level 8
Joined
Apr 23, 2010
Messages
312
If the message does nothing at the top of the trigger, then the variable that I mentioned is either getting destroyed or emptied. At the top of the trigger, put this custom script in:

JASS:
call BJDebugMsg(I2S(GetHandleId(bj_FORCE_ALL_PLAYERS)))

I tried this and it returned a number 1049833, or something close to that.

If it displays a non-zero number, then do this:

  • Player Group - Pick all players in (All Players) and do
    • Loop - Actions
      • Custom script: call BJDebugMsg("Player: " + I2S(GetPlayerId(GetEnumPlayer())))
If that doesn't show any player number(s), some script in your map is emptying that player group.

Tried this as well, and still nothing happened so I tried something else
  • Set TempPlayerGroup = (All players matching (((Picked player) slot status) Equal to Is playing))
    • Player Group - Pick every player in TempPlayerGroup and do (Actions)
      • Loop - Actions
        • Set TempPlayer = (Picked player)
        • Hero - Make TempPlayer Heroes gain TempReal% experience from future kills
        • Game - Display to (Player group(TempPlayer)) for 20.00 seconds the text: |c00FF0303Voted Set...
        • Game - Display to (Player group(TempPlayer)) for 20.00 seconds the text: |c00FFFC01---------...
        • Game - Display to (Player group(TempPlayer)) for 20.00 seconds the text: (|c00FEBA0EXP Rate: |r + (String(TempInteger2)))
        • Game - Display to (Player group(TempPlayer)) for 20.00 seconds the text: (|c00FEBA0ETroop Count: |r + (String(TempInteger)))
    • Custom script: call DestroyForce(udg_TempPlayerGroup)
This also did nothing so now i'm looking through all the code to see if I somehow destroyed the force but I don't believe it was destroyed. Have you ever come across an issue like this before?
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
"(All players matching (((Picked player) slot status) Equal to Is playing))"

Matching player instead of Picked player?

If a message at the top of your trigger doesnt display, you either have a "Clear text messages" in a short timed periodic loop.
Or you dont run the trigger at all.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,192
I tried this and it returned a number 1049833, or something close to that.
That means it has not been destroyed.
Tried this as well, and still nothing happened so I tried something else
That means the force has been emptied. Some trigger in your map is behaving very badly and emptying the force that is meant to be constant.
 

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,464
Ok, based on these findings, the (All players) force has been emptied or destroyed without being nulled. Go to Object Manager in your map and look for any Player Group function and assess if the (All players) player group is gettinf emptied by one of those.

If not, then it becomes a tedious task to find where the force is being eliminated. Any custom script in your map has to be searched for where the force may be referenced. These include:

JASS scripts
vJass scripts
"Custom script: " actions in GUI.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Ok, based on these findings, the (All players) force has been emptied or destroyed without being nulled. Go to Object Manager in your map and look for any Player Group function and assess if the (All players) player group is gettinf emptied by one of those.

I thought he said that it is working now...

.... Thank you, that made it work! Still have to find out whats doing that though.

Picked player is for inside the loop.
While matching player corresponds to the loop at the creation of a group when you want to filter out certain players...
Yes, they are redundant and yes, there is no reason to have 2 loops so better place the filter inside the loop... it is also much more readable.
(When you want to use the group multiple times, you can remove the player that doesnt pass the filter from the group so you dont have to do the checks multiple times.)
 

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,464
He's saying that "rebuilding" the (All players) group fixes the problem when he uses that replica group, instead.

I was pointing out that the problem with the (All Players) group is that either a GUI or JASS statement is creating or destroying it. The fact that it's set to a handle ID means that Blizzard.j has initialized, but does not indicate if it got destroyed or simply cleared. Some script in his map is doing something it's not supposed to.
 
Level 8
Joined
Apr 23, 2010
Messages
312
You were right Bribe, there was a TempPlayerGroup variable set to (All Players) that was being destroyed at the end of a loop. Now messages to (All Players) work anywhere they are placed!

Ok, based on these findings, the (All players) force has been emptied or destroyed without being nulled. Go to Object Manager in your map and look for any Player Group function and assess if the (All players) player group is gettinf emptied by one of those.

This helped a lot in finding it.
 
Status
Not open for further replies.
Top