Jump to content

[Guide]Hero Arenas and Choosing heroes

Recommended Posts

Hero Arenas and Choosing heroes


  • * Introduction
  • * Basic Hero Setup
  • * Creating Wisps
  • * Rules about Choosing Heroes
  • * Creating heroes with Triggers
  • * Repick Trigger
  • * Summary

By SD_Ryoko




This tutorial is about creating an area for a player to choose his hero. This is most common in hero arena maps, where players are given a wisp, or 'chooser unit' and can select which hero they want to play. This tutorial will cover how to create an area for choosing heroes, and how to set up the triggers that create them.


See also : Hero Taverns

Basic Hero Setup


The setup we are going to use today is seen in many hero arena maps. There will be a group of heroes in a remote location on the map, with a circle of power next to each hero. Each player is given a wisp, and a hero is created when they step inside the circle.


We will need to designate an area on the map for your heroes. For every available choice, we will need one hero, one circle of power and one region. The hero on the map is only to show the player which hero they can choose, and nothing more. The hero should belong to neutral passive, so they don't wander or attack anyone. If you need to, you can make the heroes invunerable at map initalization, to prevent players from attacking them.


The circle of power in front of it is where the wisp should go to choose that hero. We will also need a region inside the circle of power. For now, we will start with two heroes in this example.


   * Place a hero on the map for every hero your map has.

   * Create a circle of power somewhere near the hero.

   * Create a region that fits inside the circle of power.

   * Heroes should belong to neutral passive.


Create an area for choosing heroes.

Creating Wisps


Every player in the game will need a wisp (or other chooser type unit) to select which thero they want to play. When the game starts, we would like each player to be looking at the available heroes, so we will create the player starting locations somewhere in that area. Do not place the starting units to close to eachother, or sometimes the wisp cannot be created there.


Next we will need to create the wisps. It is easy to place a wisp for each player near the heroes, but if a player is not present, there will be an inactive wisp sitting on the map. I prefere to create a wisp only for players in the game, so we are going to create the wisps for each player using a trigger. Also, my trigger will only make a wisp for human controlled players that are in the game, and not spectating or defeated.


   * Create a starting location for each player near your heroes.

   * Add a trigger that creates a wisp for each player.

Create Wisp


       Map initialization



       Player Group - Pick every player in (All players) and do (Actions)

           Loop - Actions

               If (All Conditions are True) then do (Then Actions) else do (Else Actions)

                   If - Conditions

                       ((Picked player) controller) Equal to User

                       ((Picked player) slot status) Equal to Is playing

                   Then - Actions

                       Unit - Create 1 Wisp for (Picked player) at ((Picked player) start location) facing Default building facing degrees

                   Else - Actions

                       Do nothing


Rules about Choosing Heroes


Every map has different rules about choosing a hero. Some maps allow a player to pick any hero they like. Other maps only allow one of each hero to be picked. Typically, modern maps only allow one of each hero, and have options such as -repick and -random. In this example, we will limit heroes to one of each type and add a repick system. You can later add more options later if you like.


First to keep track of what heroes have been taken, we will need to store that in a variable. We are going to make and integer type variable, that is an array. By default, all the integers will be zero. Each integer represents one of the heroes on your map. Inside the trigger module, click on Edit, Variables and create a variable as shown.


   * An integer variable stores which heroes have been taken.

   * Create an integer array inside the Variable Editor.

   * Maps can also have options like -repick and -random.


Adding a variable to control heroes.

Creating Heroes with Triggers


The last thing we need to do is add a trigger to create the heroes. If you are more advanced in trigger code, you can store your hero types and regions inside an array. This example will keep it rather simple. We will have one trigger for every available hero. It is a little more work, but once you finish the first trigger, you can copy it and alter it for the next hero.


When the wisp steps inside a circle, we will first check to see if that hero is taken. If not, we will create the hero, mark that hero as taken, and remove the wisp from the game. For visual purposes, we will hide that hero on the map so that players know it is unavailable.


My trigger will create the hero in the center of the map. If you want to create them somewhere else, you could make a new region somewhere in your map. Typically, players and teams have different starting places, and you will either one or two regions to place the heroes. Lastly, if you wanted to add a -repick system later, all you would have to do is unhide that type of hero on the map, and set our variable back to zero for that hero.


   * Create a trigger for every hero available in your map.

   * Hide the hero on the map.

   * Create a hero for the owner of the wisp.

   * Remove the wisp or chooser unit from the game.


My variable corresponds with my regions. Hero one is region one, and hero two is region two.

Choose Hero 1


       Unit - A unit enters Hero 1 Region <gen>


       ((Unit-type of (Triggering unit)) Equal to Wisp) and (Pick_Taken[1] Equal to 0)


       Set Pick_Taken[1] = 1

       Unit - Hide Demon Hunter 0001

       Unit - Create 1 Demon Hunter for (Owner of (Triggering unit)) at (Center of Start Region <gen>) facing Default building facing degrees

       Camera - Pan camera for (Owner of (Triggering unit)) to (Center of Start Region <gen>) over 0.00 seconds

       Unit - Remove (Triggering unit) from the game


Choose Hero 2


       Unit - A unit enters Hero 2 Region <gen>


       ((Unit-type of (Triggering unit)) Equal to Wisp) and (Pick_Taken[2] Equal to 0)


       Set Pick_Taken[2] = 1

       Unit - Hide Sorceress 0002

       Unit - Create 1 Sorceress for (Owner of (Triggering unit)) at (Center of Start Region <gen>) facing Default building facing degrees

       Camera - Pan camera for (Owner of (Triggering unit)) to (Center of Start Region <gen>) over 0.00 seconds

       Unit - Remove (Triggering unit) from the game

Repick Trigger


Now I want to add a repick trigger to the map. It will work similar to the other hero triggers, but it will work backwards. When any player types -repick, I want to unhide the dummy unit, and make my Pick_Taken variable for that hero 0, so it is available again. I've noticed if you don't make the hero available again, you start running out of heroes. We will use IF statements to determine what hero that player has. After unhiding the dummy unit, we will remove his hero from the game and creating a new wisp for the player to use.


   * Pick a hero unit owned by that player.

   * Unhide that type of unit.

   * Change our variable for that type of unit.

   * Remove the hero from the game.

   * Create a new wisp for that player.


If you want, you can make the hero available again, by unhiding the unit and setting Pick_Taken[] to 0.

Repick Hero


       Player - Player 1 (Red) types a chat message containing -repick as An exact match

       Player - Player 2 (Blue) types a chat message containing -repick as An exact match

       Player - Player 3 (Teal) types a chat message containing -repick as An exact match



       Unit Group - Pick every unit in (Random 1 units from (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))) and do (Actions)

           Loop - Actions

               Unit - Remove (Picked unit) from the game

       Camera - Pan camera for (Triggering player) to ((Picked player) start location) over 0.00 seconds

       Unit - Create 1 Choose A Hero for (Triggering player) at (Center of WispRegions[(Player number of (Triggering player))]) facing (Center of Start Region <gen>)



After getting all the basics down, you can add more advanced options. A lot of how the map works is personal preference, but this should get you off to a good start. When you are done, you should have an area on your map that looks like this.


Finished hero arena.

Credit's : SD_Ryoko

If one of this share already exist or iam in wrong section one mod check it..!!Cya..!!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Posts

    • totally agree, the problem started with professionals who made easy to open a server, specially interlude has been abused unstoppably since you can open a server with few clicks now days making fewer players for many servers, while back in time when "compile" was a secret and opening a server was going max players but true things are changing and this has become a job but dont lie everyone knows what is going on, lying is showing desperation, better go and work. i've worked with lots of people with kids that invest huge amounts of money into this and fail while they needed the money its an addiction.
    • well,we all know that everyone is doing it for money. And it's acceptable since you put much more effort than the usual admins. If you're proffesional on l2 servers,i don't find a reason to not see it as a job. Ofc it's job,but all jobs has their own prides. I'll talk about me,i'm a guy that working 10 +/- hours per day. I have 2-3 free hours on my daily activity and sometimes i enjoy playing Lineage because nostalgia hits me everyday. If you are many years on scene,u'll understand that lineage will never be the same like old days. Days that we was gathering at internet cafes,and the battle was daily. Anyway, some people perfer to pay big clans and provide them black market with special prices and benefits that a casual player wont have. Also big clans means big wars,so server will have population even if you have zero quality. And there is some projects that wont pay those d1ckheads,so they wont join them and project need to find other ways to increase the population. So,i'm a player that i'll donate 20-40-50 euros on every server i play,and usually i'm getting "scammed" since they re-open their server every 2 months. And the problem is that,i personally don't mind to donate few money every 2 months for my joy,but the majority of owners has zero knowledge about L2 gaming. That's why they can't fix a sh1t,and when the problems pile up,they slowly close the server and starting advertising for another one. Actually,on high rate scene mostly,is the same guy that doing it everytime. He opens his project for 1-2 months,he close it and before he shut down the server,he has already started the advertising on his next server with different name. It's just crazy and that part shouldn't be acceptable. So yes,i perfer to support a project with honest admin team,and somewhere they have the knowledge to implent things. Business is business,but at least as community,we should enjoy our game that we love, cheers. 
    • thanks for sharing !! any guide to install this? it would be great!!
  • Topics

  • Create New...