- Joined
- Mar 9, 2023
- Messages
- 75
Hello again!
At the end of my map there are two triggers that become enabled. They check if the fight is over, and to see who the winner who the winner is. I need help getting the triggers to guaranteed trigger, and ideally not be too hasty in case they've got Reincarnation. These triggers leak, I know, that's not what I need help with.
Trigger checking for hero win:
Thralls is each player except for the Traitor Player.
Remove trigger handles Hero deaths, where when they die the unit is saved and removed.
What currently happens is that when the Heroes are supposed to win, the event doesn't kick off. The Traitor win event is easier to kick off. I've tried a few different conditions, like checking if the ChosenHeroUnit is dead, which I think was a bust, and something more I can't remember.
I'm currently thinking that a solution could be to make the event a Unit Dies. Then run a timer for a new trigger, checking something about the ChosenHeroUnit. But it's a very hard event to test, so I can't try out all wacky solutions. Are there any good solutions that come to mind?
At the end of my map there are two triggers that become enabled. They check if the fight is over, and to see who the winner who the winner is. I need help getting the triggers to guaranteed trigger, and ideally not be too hasty in case they've got Reincarnation. These triggers leak, I know, that's not what I need help with.
Trigger checking for hero win:
-
CinematicWinHeroes
-
Events
-
Time - Every 6.00 seconds of game time
-
-
Conditions
-
(BOSSARENA <gen> contains ChosenHeroUnit) Equal to False
-
-
Actions
-
Trigger - Turn off Remove <gen>
-
Player Group - Pick every player in Thralls and do (Actions)
-
Loop - Actions
-
Set VariableSet Points[(Player number of (Picked player))] = (Points[(Player number of (Picked player))] + 10)
-
-
-
Trigger - Run CinematicEndGood <gen> (ignoring conditions)
-
Trigger - Turn off (This trigger)
-
-
-
CinematicWinTraitor
-
Events
-
Time - Every 6.00 seconds of game time
-
-
Conditions
-
(BOSSARENA <gen> contains ChosenHeroUnit) Equal to True
-
-
Actions
-
Set VariableSet AliveHeroes = 0
-
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is dead) Equal to False
-
-
Then - Actions
-
Set VariableSet AliveHeroes = (AliveHeroes + 1)
-
-
Else - Actions
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AliveHeroes Less than or equal to 1
-
-
Then - Actions
-
Trigger - Run CinematicEndBad <gen> (ignoring conditions)
-
Trigger - Turn off Remove <gen>
-
Set VariableSet Points[(Player number of (Owner of ChosenHeroUnit))] = (Points[(Player number of (Owner of ChosenHeroUnit))] + (Players x 10))
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
Thralls is each player except for the Traitor Player.
Remove trigger handles Hero deaths, where when they die the unit is saved and removed.
What currently happens is that when the Heroes are supposed to win, the event doesn't kick off. The Traitor win event is easier to kick off. I've tried a few different conditions, like checking if the ChosenHeroUnit is dead, which I think was a bust, and something more I can't remember.
I'm currently thinking that a solution could be to make the event a Unit Dies. Then run a timer for a new trigger, checking something about the ChosenHeroUnit. But it's a very hard event to test, so I can't try out all wacky solutions. Are there any good solutions that come to mind?