D
DsD)Core(
Guest
Introduction
Hey, I've started working on an Arena map a while ago. I've looked into other Arena maps to get started, but ended up with a completely different, much more neat and polished system myself. In my opinion and personal experience with it, that is.
So I thought, why not share it with you guys. I've seen alot of slow, laggy or bugged arena maps around. And this system, which is actually quite simple, is still very efficient. And for people who want to make an arena map but have no clue how to start, here you go.
The system is in the attached map. All triggers are under the spoilers below, but I highly suggest downloading the map for a better view.
Here is a brief explanation of how the system works:
-A countdown starts at 120 seconds, and will trigger the first round when it hits 0. All heroes are refreshed with health, mana and cooldowns, and teleported to the arena. Each team at a different spot.
-Assuming each player has 1 hero, the amount of Alive heroes integer is set according to the present players.
-If a hero dies, one is substracted from the Alive integer of that team (which will also happen if a player leaves). The hero is then resurrected to it's team's town.
-If a hero dies and the Alive integer of either teams hit 0, the round is ended. Heroes are instantly refreshed to prevent bugs caused by dots, and they are teleported to their towns. +1 is added to the RoundCounter. The Countdown is set to 60 seconds.
-The sequence starts all over again.
The timer (triggers arena start)
Hero death (triggers death vars, resurrection and win check)
Leaving (will correct the amount of alive players and remove the leavers' units)
Game end (will trigger be triggered by round end if roundcounter is at max)
Arena start (triggered by the timer)
Win check (triggered by hero death, will trigger re-loop if either teams are defeated)
Town port (triggered by arena end)
Arena port (triggered by arena start)
Round up (triggered after round end)
Arena end (triggered by win check, will re-loop the sequence)
Hero refresh (sets heroes instantly to full health&mana, resets cooldowns, triggered by arena port & arena end)
Hero resurrection (triggered by hero death)
Death vars (will set variables required to properly trigger the win check, leaves room for killing sprees and anything you want)
Notes
This is is a very simple system, but unlike other arena's I do not work with periodic events that check if a team is dead and stuff like that. All triggers are linked in a loop, and in such a way that it's extremely easy to implement extra features. Warning messages, a multiboard, commands, anything you can imagine to enhance an Arena map, can be easily added without making the triggers one big sloppy mess in the long run.
Explanations on each trigger can be found at the trigger comment of each trigger. Please note that I more or less ''ripped'' the system from my own map and removed a gazillion of variables and events that are purely aimed towards the content of my map. Eventhough I double checked everything, errors are possible. I'm pretty sure there aren't any, though.
It's also noteworthy that I used leak removals for everything. The custom scripts might look a little scary for the beginner, but actually make good sense. Just look closer into the triggers and variables and you'll see.
I hope this system helps, and if any features are actually really wanted, feel free to ask and I'll simply implement them.
Hey, I've started working on an Arena map a while ago. I've looked into other Arena maps to get started, but ended up with a completely different, much more neat and polished system myself. In my opinion and personal experience with it, that is.
So I thought, why not share it with you guys. I've seen alot of slow, laggy or bugged arena maps around. And this system, which is actually quite simple, is still very efficient. And for people who want to make an arena map but have no clue how to start, here you go.
The system is in the attached map. All triggers are under the spoilers below, but I highly suggest downloading the map for a better view.
Here is a brief explanation of how the system works:
-A countdown starts at 120 seconds, and will trigger the first round when it hits 0. All heroes are refreshed with health, mana and cooldowns, and teleported to the arena. Each team at a different spot.
-Assuming each player has 1 hero, the amount of Alive heroes integer is set according to the present players.
-If a hero dies, one is substracted from the Alive integer of that team (which will also happen if a player leaves). The hero is then resurrected to it's team's town.
-If a hero dies and the Alive integer of either teams hit 0, the round is ended. Heroes are instantly refreshed to prevent bugs caused by dots, and they are teleported to their towns. +1 is added to the RoundCounter. The Countdown is set to 60 seconds.
-The sequence starts all over again.
The timer (triggers arena start)
Code:
Globalsys timer
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
CountDown Greater than 0
CountDown Less than 125
Then - Actions
Set CountDown = (CountDown - 1)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
CountDown Equal to 0
Then - Actions
Set CountDown = 125
Trigger - Run Arenasys start <gen> (checking conditions)
Else - Actions
Do nothing
Hero death (triggers death vars, resurrection and win check)
Code:
Globalsys hero death
Events
Unit - A unit Dies
Conditions
((Triggering unit) is A Hero) Equal to True
Actions
Trigger - Run Herosys death vars <gen> (checking conditions)
Trigger - Run Herosys resurrection <gen> (checking conditions)
Trigger - Run Arenasys win check <gen> (checking conditions)
Leaving (will correct the amount of alive players and remove the leavers' units)
Code:
Globalsys leaving
Events
Player - Player 1 (Red) leaves the game
Player - Player 2 (Blue) leaves the game
Player - Player 3 (Teal) leaves the game
Player - Player 4 (Purple) leaves the game
Player - Player 5 (Yellow) leaves the game
Player - Player 6 (Orange) leaves the game
Player - Player 7 (Green) leaves the game
Player - Player 8 (Pink) leaves the game
Player - Player 9 (Gray) leaves the game
Player - Player 10 (Light Blue) leaves the game
Player - Player 11 (Dark Green) leaves the game
Player - Player 12 (Brown) leaves the game
Conditions
Actions
Set UnitGroup[5] = (Units owned by (Triggering player))
Unit Group - Pick every unit in UnitGroup[5] and do (Unit - Remove (Picked unit) from the game)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering player) is an ally of Player 1 (Red)) Equal to True
Then - Actions
Set Alive[1] = (Alive[1] - 1)
Else - Actions
Set Alive[2] = (Alive[2] - 1)
Game end (will trigger be triggered by round end if roundcounter is at max)
Code:
Globalsys game end
Events
Conditions
Actions
Set GameEnd = True
Trigger - Turn off Arenasys endsys <gen>
Trigger - Turn off Globalsys timer <gen>
Arena start (triggered by the timer)
Code:
Arenasys start
Events
Conditions
Actions
Set RoundCounter = (RoundCounter + 1)
Set Alive[1] = (Number of players in (All players matching ((((Matching player) controller) Equal to User) and ((((Matching player) slot status) Equal to Is playing) and (((Matching player) is an ally of Player 1 (Red)) Equal to True)))))
Set Alive[2] = (Number of players in (All players matching ((((Matching player) controller) Equal to User) and ((((Matching player) slot status) Equal to Is playing) and (((Matching player) is an ally of Player 1 (Red)) Equal to False)))))
Trigger - Run Arenasys arena port <gen> (checking conditions)
Trigger - Run Herosys refresh <gen> (checking conditions)
Win check (triggered by hero death, will trigger re-loop if either teams are defeated)
Code:
Arenasys win check
Events
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Alive[1] Equal to 0
Then - Actions
Trigger - Run Arenasys endsys <gen> (checking conditions)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Alive[2] Equal to 0
Then - Actions
Trigger - Run Arenasys endsys <gen> (checking conditions)
Else - Actions
Do nothing
Town port (triggered by arena end)
Code:
Arenasys town port
Events
Conditions
Actions
Trigger - Run Herosys refresh <gen> (checking conditions)
Set UnitGroup[1] = (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True))
Unit Group - Pick every unit in UnitGroup[1] and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) belongs to an ally of Player 1 (Red)) Equal to True
Then - Actions
Set Point[1] = (Center of TownForce1 <gen>)
Camera - Pan camera for (Owner of (Picked unit)) to Point[1] over 0.00 seconds
Unit - Move (Picked unit) instantly to Point[1]
Custom script: call RemoveLocation(udg_Point[1])
Else - Actions
Set Point[2] = (Center of TownForce2 <gen>)
Camera - Pan camera for (Owner of (Picked unit)) to Point[2] over 0.00 seconds
Unit - Move (Picked unit) instantly to Point[2]
Custom script: call RemoveLocation(udg_Point[2])
Custom script: call DestroyGroup(udg_UnitGroup[1])
Arena port (triggered by arena start)
Code:
Arenasys arena port
Events
Conditions
Actions
Set Point[3] = (Center of Arena Force1 Start <gen>)
Set Point[4] = (Center of Arena Force2 Start <gen>)
Set UnitGroup[3] = (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True))
Unit Group - Pick every unit in UnitGroup[3] and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) belongs to an ally of Player 1 (Red)) Equal to True
Then - Actions
Unit - Move (Picked unit) instantly to Point[3]
Camera - Pan camera for (Owner of (Picked unit)) to Point[3] over 0.00 seconds
Else - Actions
Unit - Move (Picked unit) instantly to Point[4]
Camera - Pan camera for (Owner of (Picked unit)) to Point[4] over 0.00 seconds
Custom script: call RemoveLocation(udg_Point[3])
Custom script: call RemoveLocation(udg_Point[4])
Custom script: call DestroyGroup(udg_UnitGroup[3])
Round up (triggered after round end)
Code:
Arenasys round up
Events
Conditions
Actions
Set UnitGroup[3] = (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True))
Unit Group - Pick every unit in UnitGroup[3] and do (Actions)
Loop - Actions
Hero - Set (Picked unit) Hero-level to (RoundCounter + 1), Show level-up graphics
Player - Add 1000 to (Owner of (Picked unit)) Current gold
Custom script: call DestroyGroup(udg_UnitGroup[3])
Arena end (triggered by win check, will re-loop the sequence)
Code:
Arenasys endsys
Events
Conditions
Actions
Trigger - Run Herosys refresh <gen> (checking conditions)
Set Alive[1] = 6
Set Alive[2] = 6
Wait 2.00 seconds
Trigger - Run Arenasys town port <gen> (checking conditions)
Set CountDown = 60
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
RoundCounter Greater than or equal to 11
Then - Actions
Trigger - Run Globalsys game end <gen> (checking conditions)
Else - Actions
Trigger - Run Arenasys round up <gen> (checking conditions)
Hero refresh (sets heroes instantly to full health&mana, resets cooldowns, triggered by arena port & arena end)
Code:
Herosys refresh
Events
Conditions
Actions
Set UnitGroup[3] = (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True))
Unit Group - Pick every unit in UnitGroup[3] and do (Actions)
Loop - Actions
Unit - Set life of (Picked unit) to 100.00%
Unit - Set mana of (Picked unit) to 100.00%
Unit - Reset ability cooldowns for (Picked unit)
Custom script: call DestroyGroup(udg_UnitGroup[3])
Hero resurrection (triggered by hero death)
Code:
Herosys resurrection
Events
Conditions
Actions
Wait 1.00 seconds
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Dying unit) belongs to an ally of Player 1 (Red)) Equal to True
Then - Actions
Set Point[1] = (Center of TownForce1 <gen>)
Hero - Instantly revive (Dying unit) at Point[1], Show revival graphics
Custom script: call RemoveLocation(udg_Point[1])
Else - Actions
Set Point[2] = (Center of TownForce2 <gen>)
Hero - Instantly revive (Dying unit) at Point[2], Show revival graphics
Custom script: call RemoveLocation(udg_Point[2])
Death vars (will set variables required to properly trigger the win check, leaves room for killing sprees and anything you want)
Code:
Herosys death vars
Events
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Dying unit)) is an ally of Player 1 (Red)) Equal to True
((Owner of (Killing unit)) is an ally of Player 1 (Red)) Equal to False
Then - Actions
Set Alive[1] = (Alive[1] - 1)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Dying unit)) is an ally of Player 1 (Red)) Equal to True
((Owner of (Dying unit)) is an ally of Player 1 (Red)) Equal to True
Then - Actions
Set Alive[2] = (Alive[2] - 1)
Else - Actions
Do nothing
Notes
This is is a very simple system, but unlike other arena's I do not work with periodic events that check if a team is dead and stuff like that. All triggers are linked in a loop, and in such a way that it's extremely easy to implement extra features. Warning messages, a multiboard, commands, anything you can imagine to enhance an Arena map, can be easily added without making the triggers one big sloppy mess in the long run.
Explanations on each trigger can be found at the trigger comment of each trigger. Please note that I more or less ''ripped'' the system from my own map and removed a gazillion of variables and events that are purely aimed towards the content of my map. Eventhough I double checked everything, errors are possible. I'm pretty sure there aren't any, though.
It's also noteworthy that I used leak removals for everything. The custom scripts might look a little scary for the beginner, but actually make good sense. Just look closer into the triggers and variables and you'll see.
I hope this system helps, and if any features are actually really wanted, feel free to ask and I'll simply implement them.