- Joined
- Sep 26, 2009
- Messages
- 2,520
Hello. I tried to make a little arena fight, however I am having problems setting it correctly.
I wanted a friendly arena match - there are 2 opponents that wouldn't die, but instead they would be teleported out of the arena once they have very low hp (10 or less).
The problem is that the trigger I set for that doesn't really work. Sometimes both opponents die and nothing happens; sometimes only one dies and the other is teleported away; sometimes killing one acts as if I defeated both and I win the arena. I often saw, that even though one of the opponents took damage and had less than 10 hp left, only the next blow to the opponent triggered the effect. Also, it happened to me that the opponent died and his corpse was teleported out of the arena.
I use the trigger below, one per opponent.
To explain a few things:
Could anyone help me solve this problem, please?
I wanted a friendly arena match - there are 2 opponents that wouldn't die, but instead they would be teleported out of the arena once they have very low hp (10 or less).
The problem is that the trigger I set for that doesn't really work. Sometimes both opponents die and nothing happens; sometimes only one dies and the other is teleported away; sometimes killing one acts as if I defeated both and I win the arena. I often saw, that even though one of the opponents took damage and had less than 10 hp left, only the next blow to the opponent triggered the effect. Also, it happened to me that the opponent died and his corpse was teleported out of the arena.
I use the trigger below, one per opponent.
-
Swordsmen Duo 094
-
Events
- Unit - Swordsman 0094 <gen> Takes damage
-
Conditions
- (Life of Swordsman 0094 <gen>) Less than or equal to 10.00
-
Actions
- Trigger - Turn off (This trigger)
- Unit - Set life of Swordsman 0094 <gen> to 10.00
- Unit - Make Swordsman 0094 <gen> Invulnerable
- Unit - Pause Swordsman 0094 <gen>
- Set ArenaVariable[1] = (ArenaVariable[1] + 1.00)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ArenaVariable[1] Equal to 2.00
-
Then - Actions
- -------- //////////////////////////////////////////////// --------
- -------- If the var = 2, both enemies are defeated and the match is won --------
- -------- //////////////////////////////////////////////// --------
- Cinematic - Disable user control for (All players)
- Unit - Order <Hero> to Stop
- Player - Make Player 1 (Red) treat Player 3 (Teal) as an Neutral
- Player - Make Player 3 (Teal) treat Player 1 (Red) as an Neutral
- Set ArenaEndPoint[1] = (Position of <Arena Warden> <gen>)
- Set ArenaEndPoint[2] = (ArenaEndPoint[1] offset by 100.00 towards 225.00 degrees)
- Cinematic - Fade out over 2.00 seconds using texture White Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
- Wait 2.00 seconds
- Unit - Move <Hero> instantly to ArenaEndPoint[2], facing 45.00 degrees
- Unit - Remove Swordsman 0094 <gen> from the game
- Unit - Remove Swordsman 0095 <gen> from the game
- Trigger - Run Arena No Fight <gen> (checking conditions)
- Camera - Pan camera for Player 1 (Red) to (Position of <Hero>) over 0.00 seconds
- Cinematic - Fade in over 2.00 seconds using texture White Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
- Wait 2.00 seconds
- Unit - Make <Arena Warden> <gen> face <Hero> over 0.20 seconds
- Cinematic - Send transmission to (All players) from <Arena Warden> <gen> named <Arena Warden>: Play No sound and display You've got some goo.... Modify duration: Set to 9.00 seconds and Wait
- Cinematic - Enable user control for (All players)
-
Else - Actions
- -------- //////////////////////////////////////////////// --------
- -------- Only 1 enemy is down, item is dropped and the enemy is teleported away --------
- -------- //////////////////////////////////////////////// --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ArenaVariable[2] Equal to 1.00
-
Then - Actions
- Set ArenaVariable[2] = 0.00
- Set ArenaItemPoint[1] = (Position of Swordsman 0094 <gen>)
- Set ArenaItemPoint[2] = (ArenaItemPoint[1] offset by 60.00 towards 270.00 degrees)
- Item - Create Potion of Healing at ArenaItemPoint[2]
- Else - Actions
-
If - Conditions
- Animation - Play <Arena Warden> <gen>'s spell animation
- Wait 0.30 seconds
- Special Effect - Create a special effect at (Position of Swordsman 0094 <gen>) using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
- Special Effect - Destroy (Last created special effect)
- Wait 0.20 seconds
- Unit - Unpause Swordsman 0094 <gen>
- Unit - Move Swordsman 0094 <gen> instantly to (Center of Safe Area 04 <gen>), facing 340.00 degrees
- Unit - Pause Swordsman 0094 <gen>
- Wait 0.50 seconds
- Animation - Play <Arena Warden> <gen>'s stand animation
-
If - Conditions
-
Events
- Set ArenaVariable[1] - This is set to 0 and detects how many opponents were defeated (to check if the player won the arena, or still has to fight)
- Set ArenaVariable[2] - This is set to 1 and for every defeated opponent (except the last one), an item will be created (in this case where there are 2 opponents, only 1 will drop an item).
- Unit - <Arena Warden> - This unit only plays spell animation when defeated opponent is teleported away and serves as the one who let's the player in the arena
- Trigger - Run Arena No Fight <gen> (checking conditions) - this trigger has nothing to do with the fight itself, it only spawns a couple of units into the arena, when the player himself is not participating in any match