This is the trigger I'm using for one of my dungeons in my RPG map
It's basically if a unit enters the exit region and no one else is in the dungeon then it resets the dungeon
However it doesn't work when a hero does, thus the dungeon becomes closed forever and won't reset.
So how do I modify it so that when a unit dies and the unit is a player hero, and there is no longer any player controlled units in the area that the dungeon will reset?
It's basically if a unit enters the exit region and no one else is in the dungeon then it resets the dungeon
Trigger:
- Reset
- Events
- Unit - A unit leaves GauntletArea <gen>
- Conditions
- ((Units in GauntletArea <gen> matching (((Matching unit) belongs to an enemy of p_hostilecreep) Equal to True)) is empty) Equal to True
- Actions
- Set ug_gauntlet1 = (Units in GauntletArea <gen> matching (((Matching unit) belongs to an enemy of Player 1 (Red)) Equal to True))
- Unit Group - Pick every unit in ug_gauntlet1 and do (Actions)
- Loop - Actions
- Unit - Remove (Picked unit) from the game
- Loop - Actions
- Destructible - Close Flow Gate (Vertical) 0317 <gen>
- Destructible - Close Flow Gate (Vertical) 0318 <gen>
- Set b_gauntlet = False
- Trigger - Turn on Send <gen>
- Custom script: call DestroyGroup (udg_ug_gauntlet1)
- Events
However it doesn't work when a hero does, thus the dungeon becomes closed forever and won't reset.
So how do I modify it so that when a unit dies and the unit is a player hero, and there is no longer any player controlled units in the area that the dungeon will reset?