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

Timer windows won't show

Status
Not open for further replies.
Level 18
Joined
May 11, 2012
Messages
2,103
  • Start Timer
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • Set HeroInteger[1] = (Team number of Player 1 (Red))
          • Set HeroInteger[2] = (Team number of Player 2 (Blue))
          • Set HeroInteger[3] = (Team number of Player 3 (Teal))
          • Set HeroInteger[4] = (Team number of Player 4 (Purple))
          • Set HeroInteger[5] = (Team number of Player 5 (Yellow))
          • Set HeroInteger[6] = (Team number of Player 6 (Orange))
          • Set HeroInteger[7] = (Team number of Player 7 (Green))
          • Set HeroInteger[8] = (Team number of Player 8 (Pink))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Triggering unit) Equal to Hero[HeroInteger[1]]
                  • (Triggering unit) Equal to Hero[HeroInteger[2]]
                  • (Triggering unit) Equal to Hero[HeroInteger[3]]
                  • (Triggering unit) Equal to Hero[HeroInteger[4]]
                  • (Triggering unit) Equal to Hero[HeroInteger[5]]
                  • (Triggering unit) Equal to Hero[HeroInteger[6]]
                  • (Triggering unit) Equal to Hero[HeroInteger[7]]
                  • (Triggering unit) Equal to Hero[HeroInteger[8]]
            • Then - Actions
              • Countdown Timer - Create a timer window for TimerRespawn[HeroInteger[(Team number of (Owner of (Triggering unit)))]] with title ((( + (String(HeroInteger[(Team number of (Owner of (Triggering unit)))]))) + Respawn in:)
              • Set TimerWindowRespawn[HeroInteger[(Team number of (Owner of (Triggering unit)))]] = (Last created timer window)
              • Countdown Timer - Start TimerRespawn[HeroInteger[(Team number of (Owner of (Triggering unit)))]] as a One-shot timer that will expire in 120.00 seconds
              • Countdown Timer - Show TimerWindowRespawn[HeroInteger[(Team number of (Owner of (Triggering unit)))]]
            • Else - Actions
        • Else - Actions
I don't know why it doesn't show timer window

:ogre_rage: :ogre_rage: :ogre_rage: :ogre_rage: :ogre_rage:
 
Last edited:
Level 4
Joined
Mar 3, 2010
Messages
68
Just took a quick a glance at this.

Shouldn't you create the timer first before creating the window?


If you look at this specific section of code, chances are your timer variable TimerRespawn has a null value when you call the create window function.
  • Countdown Timer - Create a timer window for TimerRespawn[HeroInteger[(Team number of (Owner of (Triggering unit)))]] with title ((( + (String(HeroInteger[(Team number of (Owner of (Triggering unit)))]))) + Respawn in:)
  • Set TimerWindowRespawn[HeroInteger[(Team number of (Owner of (Triggering unit)))]] = (Last created timer window)
  • Countdown Timer - Start TimerRespawn[HeroInteger[(Team number of (Owner of (Triggering unit)))]] as a One-shot timer that will expire in 120.00 seconds
  • Countdown Timer - Show TimerWindowRespawn[HeroInteger[(Team number of (Owner of (Triggering unit)))]]
The code should be:

  • Countdown Timer - Start TimerRespawn[HeroInteger[(Team number of (Owner of (Triggering unit)))]] as a One-shot timer that will expire in 120.00 seconds
  • Countdown Timer - Create a timer window for TimerRespawn[HeroInteger[(Team number of (Owner of (Triggering unit)))]] with title ((( + (String(HeroInteger[(Team number of (Owner of (Triggering unit)))]))) + Respawn in:)
  • Set TimerWindowRespawn[HeroInteger[(Team number of (Owner of (Triggering unit)))]] = (Last created timer window)
  • Countdown Timer - Show TimerWindowRespawn[HeroInteger[(Team number of (Owner of (Triggering unit)))]]

Just off the top of my head.
 
Level 18
Joined
May 11, 2012
Messages
2,103
1 question for you

do you know how to make picked units get impaled 0.30 seconds after the shockwave is cast? I tried creating another special effect but it didn't work

Here's the trigger

  • Claw Smash
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Claw Smash
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • Set Damage[1] = 500.00
          • Set Damage[2] = 1000.00
          • Set Damage[3] = 1500.00
          • Set Damage[4] = 2000.00
          • Set Damage[5] = ((Real((Strength of (Triggering unit) (Include bonuses)))) x (50.00 / 10.00))
          • Set TempInteger = (Level of Claw Smash for (Triggering unit))
          • Set TempGroup = (Units within 450.00 of (Position of (Triggering unit)))
          • Set TempPoint = (Position of (Triggering unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                • Then - Actions
                  • Unit Group - Pick every unit in TempGroup and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (((Picked unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Picked unit) is alive) Equal to True)
                        • Then - Actions
                          • Special Effect - Create a special effect at TempPoint using war3mapImported\s_Shockwave.mdx
                          • Special Effect - Destroy (Last created special effect)
                          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing Damage[TempInteger] damage of attack type Spells and damage type Normal
                          • Custom script: call DestroyGroup(udg_TempGroup)
                          • Custom script: call RemoveLocation(udg_TempPoint)
                        • Else - Actions
                • Else - Actions
            • Else - Actions
        • Else - Actions
 
Status
Not open for further replies.
Top