• 🏆 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] Is Countdown not working properly?

Status
Not open for further replies.
Level 17
Joined
Jun 2, 2009
Messages
1,139
  • DevilCreeptenKac
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Attacked unit) Equal to Paladin 0000 <gen>
      • zBool_AIKaciyor_Creepten[(Player number of (Owner of (Attacked unit)))] Equal to False
    • Actions
      • Set zBool_AIKaciyor_Creepten[(Player number of (Owner of (Attacked unit)))] = True
      • Set TempPoint = ((Position of (Attacked unit)) offset by 375.00 towards ((Angle from (Position of (Attacking unit)) to (Center of Region 001 <gen>)) - 0.00) degrees)
      • Unit - Order (Attacked unit) to Move To TempPoint
      • Countdown Timer - Start CreeptenKacmaBittiSeysi[(Player number of (Owner of (Attacked unit)))] as a One-shot timer that will expire in 3.00 seconds
      • Custom script: call RemoveLocation (udg_TempPoint)
      • Wait 1.00 seconds
      • Unit - Order zU_AIHero[(Player number of (Owner of (Attacked unit)))] to Attack-Move To (Center of Region 000 <gen>)
  • Timer2Kacma
    • Events
      • Time - CreeptenKacmaBittiSeysi[1] expires
    • Conditions
    • Actions
      • Game - Display to (All players) for 1.00 seconds the text: timer doldu
      • Set zBool_AIKaciyor_Creepten[1] = False
  • Untitled Trigger 001
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • zBool_AIKaciyor_Creepten[1] Equal to True
        • Then - Actions
          • Game - Display to (All players) for 1.00 seconds the text: RUNNING AWAY
        • Else - Actions
          • Game - Display to (All players) for 1.00 seconds the text: ATTACKING!
This is what i want

12:51 - Hero attacked and fall back
12:52 - Fall back completed, now hero can attack
12:53 - Hero attacked again but recently ordered again, do NOTHING! Let him fight again at least 3 seconds
12:54 -
12:55 -
12:56 - Hero attacked and fall back

Since 2 days i am trying to figure it out. Is it countdown timer related? Because i am not familiar with countdown system.
OR am i missing a point? Maybe i am trying to different way to do that.
 
Level 24
Joined
Jun 26, 2020
Messages
1,852
Maybe you can:
1) If you are using a wait, why not simply use a wait for that too?
2) When you defined CreeptenKacmaBittiSeysi array timer, did you increased the size to the max number of players?
1660154019171.png

PD: You are leaking the location "Position of (Attacked unit)".
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,557
This is what i want

12:51 - Hero attacked and fall back
12:52 - Fall back completed, now hero can attack
12:53 - Hero attacked again but recently ordered again, do NOTHING! Let him fight again at least 3 seconds
12:54 -
12:55 -
12:56 - Hero attacked and fall back

Since 2 days i am trying to figure it out. Is it countdown timer related? Because i am not familiar with countdown system.
OR am i missing a point? Maybe i am trying to different way to do that.
Remember what we told you in the other thread. The Wait method was fine, you were just missing some important actions.
  • Events
    • Unit - A unit is attacked
  • Conditions
    • FallBack[X] Equal to False
  • Actions
    • Set FallBack[X] = True
    • Unit - Order (Attacked unit) to Move To FallBackPoint
    • Wait 1.00 seconds
    • Unit - Order (Attacked unit) to Attack-Move To AttackPoint
    • Wait 3.00 seconds
    • Set FallBack[X] = False
X = The player number of the owner of the attacked unit.

This means that the hero will only every fall back at most once every 4.00 seconds.
 
Last edited:
Level 17
Joined
Jun 2, 2009
Messages
1,139
Ok, I just noticed that you didn't explained your problem.
This is what i want

12:51 - Hero attacked and fall back
12:52 - Fall back completed, now hero can attack
12:53 - Hero attacked again but recently ordered again, do NOTHING! Let him fight again at least 3 seconds
12:54 -
12:55 -
12:56 - Hero attacked and fall back

Since 2 days i am trying to figure it out. Is it countdown timer related? Because i am not familiar with countdown system.
OR am i missing a point? Maybe i am trying to different way to do that.
I even not sure about that is it working or not. I am totally confused because it is not stable. It provides different results for each tests.

Remember what we told you in the other thread. The Wait method was fine, you were just missing some important actions.
  • Events
    • Unit - A unit is attacked
  • Conditions
    • FallBack[X] Equal to False
  • Actions
    • Set FallBack[X] = True
    • Unit - Order (Attacked unit) to Move To FallBackPoint
    • Wait 1.00 seconds
    • Unit - Order (Attacked unit) to Attack-Move To AttackPoint
    • Wait 3.00 seconds
    • Set FallBack[X] = False
X = The player number of the owner of the attacked unit.

This means that the hero will only every fall back at most once every 4.00 seconds.
But this time i have made it with countdown timer but it is not stable. It provides different results somehow.
 
Status
Not open for further replies.
Top