Hi,
In this map I'm working on there's a mode in which, by successfully channeling an ability in the center of the map for 3min, you win.
The trigger works and everything, but there are warning messages that pop up when there are 2 minutes, 1 minute and 30 seconds remaining. The way the trigger is made if the Hero stops channeling but stays in the circle then the warnings will still pop up. It's just something that bugs me but doesn't affect the game. Can you tell me how to fix this so multiple warning messages won't show?
Trigger 1: In case they try cost in wrong spot
Trigger 2: Clearly the trigger that makes it bug-able. It even decrares a winner, but doesn't actually cause the player to be the winner.
Trigger 3: The countdown timers and their windows probably leak somehow, but I'm not profficient with leaks. A better way?
Trigger 4: The win-causing trigger
Hope you can help, thanks.
Edit: Fixed tags on triggers
In this map I'm working on there's a mode in which, by successfully channeling an ability in the center of the map for 3min, you win.
The trigger works and everything, but there are warning messages that pop up when there are 2 minutes, 1 minute and 30 seconds remaining. The way the trigger is made if the Hero stops channeling but stays in the circle then the warnings will still pop up. It's just something that bugs me but doesn't affect the game. Can you tell me how to fix this so multiple warning messages won't show?
Trigger 1: In case they try cost in wrong spot
Trigger:
- Failcast Victoreh
- Events
- Unit - A unit Begins channeling an ability
- Conditions
- (Ability being cast) Equal to Victoreh
- (Circle of Power <gen> contains (Triggering unit)) Equal to False
- Actions
- Unit - Order (Triggering unit) to Stop
- Events
Trigger 2: Clearly the trigger that makes it bug-able. It even decrares a winner, but doesn't actually cause the player to be the winner.
Trigger:
- Begin Channel
- Events
- Unit - A unit Begins channeling an ability
- Conditions
- (Ability being cast) Equal to Victoreh
- (Circle of Power <gen> contains (Triggering unit)) Equal to True
- Actions
- Unit - Add Spell Immunity to (Triggering unit)
- Sound - Play war3mapImported\hellmarch2.wav
- Game - Display to (All players) for 20.00 seconds the text: ((Name of (Triggering player)) + |c00FF0000has started the countdown!|r)
- Countdown Timer - Create a timer window for (Last started timer) with title Hold Center
- Countdown Timer - Start (Last started timer) as a One-shot timer that will expire in 180.00 seconds
- Countdown Timer - Show (Last created timer window)
- Wait 60.00 seconds
- If (((Circle of Power <gen> contains (Triggering unit)) Equal to False) or (((Triggering unit) is dead) Equal to True)) then do (Skip remaining actions) else do (Do nothing)
- Game - Display to (All players) for 10.00 seconds the text: |c00FF00002 minutes...
- Wait 60.00 seconds
- If (((Circle of Power <gen> contains (Triggering unit)) Equal to False) or (((Triggering unit) is dead) Equal to True)) then do (Skip remaining actions) else do (Do nothing)
- Game - Display to (All players) for 10.00 seconds the text: |c00FF00001 minute ...
- Wait 30.00 seconds
- If (((Circle of Power <gen> contains (Triggering unit)) Equal to False) or (((Triggering unit) is dead) Equal to True)) then do (Skip remaining actions) else do (Do nothing)
- Game - Display to (All players) for 10.00 seconds the text: |c00FF000030 second...
- Wait 30.00 seconds
- If (((Circle of Power <gen> contains (Triggering unit)) Equal to False) or (((Triggering unit) is dead) Equal to True)) then do (Skip remaining actions) else do (Do nothing)
- Game - Display to (All players) for 20.00 seconds the text: ((Name of (Triggering player)) + |c0096FF96is the winner!|r)
- Events
Trigger 3: The countdown timers and their windows probably leak somehow, but I'm not profficient with leaks. A better way?
Trigger:
- Stop Channel
- Events
- Unit - A unit Stops casting an ability
- Conditions
- (Ability being cast) Equal to Victoreh
- (Circle of Power <gen> contains (Casting unit)) Equal to True
- Actions
- Unit - Remove Spell Immunity from (Triggering unit)
- Game - Display to (All players) for 10.00 seconds the text: Casting time has be...
- Countdown Timer - Destroy (Last created timer window)
- Countdown Timer - Pause (Last started timer)
- Events
Trigger 4: The win-causing trigger
Trigger:
- Finish Victoreh
- Events
- Unit - A unit Finishes casting an ability
- Conditions
- (Ability being cast) Equal to Victoreh
- (Circle of Power <gen> contains (Triggering unit)) Equal to True
- Actions
- Game - Victory (Owner of (Triggering unit)) (Show dialogs, Show scores)
- Player Group - Pick every player in (All allies of (Owner of (Triggering unit))) and do (Game - Victory (Picked player) (Show dialogs, Show scores))
- Player Group - Pick every player in (All enemies of (Owner of (Triggering unit))) and do (Game - Defeat (Picked player) with the message: Defeat!)
- Events
Hope you can help, thanks.
Edit: Fixed tags on triggers