• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Duel in my game help!

Status
Not open for further replies.
Level 2
Joined
Aug 17, 2006
Messages
13
U know the famous game custom hero arena i need help to make the duel same as it timer and all but i tried but its dont worked play help me i would apreciate.
 
Level 2
Joined
Aug 17, 2006
Messages
13
suuuuuure

w/e ok ive try to make a duel arena as the game. Ive tried alots of triggers BUT its dont work.So i would need help to do it so please help me happy now :D.

If u could send the whole triggers i would appreciate. I am a little new to map making so that why i need help :S
 
Level 2
Joined
Sep 2, 2006
Messages
23
hope this is it

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
Events
Map initialization
Conditions
Actions
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
Events
Unit - A unit enters Hero 1 Region
Conditions
((Unit-type of (Triggering unit)) Equal to Wisp) and (Pick_Taken[1] Equal to 0)
Actions
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 ) facing Default building facing degrees
Camera - Pan camera for (Owner of (Triggering unit)) to (Center of Start Region ) over 0.00 seconds
Unit - Remove (Triggering unit) from the game

Choose Hero 2
Events
Unit - A unit enters Hero 2 Region
Conditions
((Unit-type of (Triggering unit)) Equal to Wisp) and (Pick_Taken[2] Equal to 0)
Actions
Set Pick_Taken[2] = 1
Unit - Hide Sorceress 0002
Unit - Create 1 Sorceress for (Owner of (Triggering unit)) at (Center of Start Region ) facing Default building facing degrees
Camera - Pan camera for (Owner of (Triggering unit)) to (Center of Start Region ) 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
Events
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
Conditions
Actions
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 )

Summary
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.

U might also need this.

About Multiboards
Multiboards can display text, icons and values.
Multiboards can use the common Warcraft color codes.
Multiboards can be assigned a variable, to show and hide them easily.
A Multiboard cannot be created at map initialization.
A Multiboard is more advanced than a Leaderboard.
Multiboards can be minimized during game play.
Multiboards are a minimizable score board for players to keep track of their kills
or points for many kinds of things like hero level and deaths.


When laying out your multiboard, remember that they accept the standard Warcraft color codes and characters. You can use a color coding program to create a nice title, and space it out on different lines as shown. You can also later modify the title and properties of the multiboard contents. All you need to create a multiboard is two triggers. One to create the board, and one to keep score on kills.

Multiboards can have as many rows and colums you need to have, as long as you fit it within the screen's size; In the case of the multiboard you will be making in this turorial we will have 3 columns, Player Icons, Player Names, Player Kills.

Setting the Players Colors
A multiboards can keep track of several different things like integer based info (kills) and string based info (player colors). Maybe you want to set the colors eatch player in the game uses. Because the board works off integers/strings, you can assign it any integer/string values you like. In the multiboard we are making, we have the multiboard setting the colors to the players by the player colors Blizzard standardly uses. (Red = Player 1 and 9 is Player Grey). Of course, this is the most common use for a multiboard (Along with other things).

So I will first need to create a variable to keep track of the colors for each player. I will open the variable editor, and create a new string variable called Player_Colors. Then I will check the Array box to keep track of more than one value. like so.


Understanding Rows and Colums
Now to being able to modify and make multiboards you need to understand a few things about rows and colums.

First of all we are going to understand what rows and colums are.

The Row is the Horizontal line in the multiboard that is changeable in numbers and sizes.
The Column is the vertical line in the multiboard that is also changeable in numbers and sizes.

In this example image to the left shows an good example of what rows and colums are and look like in the multiboard.

To edit the multiboard I made you may have to understand it a bit more and may have to be very good with triggers (Be ready for advanced multiboard making).

Creating A Simple Multiboard
Below is an image of the multiboard you are to make and the descriptions of everything your doing as you make it.



Tallying Kills Score
A multiboards can keep track of several different things. Maybe you want your board to keep track of kills. If your playing capture the flag, you would want to keep track of flags stolen. Because the board works off integers, you can assign it any integer values you like. In the multiboard we are making, we have the multiboard keeping track of kills a player makes. Of course, this is the most common use for a multiboard (Along with other things).

So I will first need to create a variable to keep track of kills for each player. I will open the variable editor, and create a new integer variable called Kill_Count. Then I will check the Array box to keep track of more than one value. like so:

Variable Name: Kill_Count

Variable Type: Integer (Array - Size 1)

Initial Value: 0 (default)


Trigger Functions for the Multiboard
Last and not least is the Trigger Functions for the multiboard. Here will give you the jist of how each multiboard trigger works.

Multiboard - Create --> Creates a multiboard with the number of columns and rows you specify and the multiboards title
Multiboard - Destroy --> Destroys a multiboard you choose (default is last created multuiboard)
Multiboard - Show/Hide --> Shows or Hides a multiboard (default is last created multiboard) Cannot use with map initalization
Multiboard - Show/Hide All--> Shows or hides all multiboards
Multiboard - Minimize/Maximize --> Minimizes or maximizes the multiboard (default is last created multiboard)
Multiboard - Clear --> Clears the multiboard (default is last created multiboard)
Multiboard - Change Title --> Changes the title of the multiboard (default is last created multiboard) to what you want it to be
Multiboard - Change Title Color --> Changes the multiboard's (default is last created multiboard) colors to (100%, 100%, 100%) with 0% transparacy. (The color values are Red, Green, Blue and 100% transparacy is compleatly invisable.
Multiboard - Change Number of Rows --> Changes how many rows the multiboard (default is last created multiboard) has.
Multiboard - Change Number of Columns --> Changes how many columns the multiboard (default is last created multiboard) has.
Multiboard - Set Item Display Style --> Changes the multiboard (default is last created multiboard) for the set column and row to have or not to have a cirten icon or text.
Multiboard - Set Item Text --> Changes the multiboard (default is last created multiboard) for the set column and row to have a cirten text
Multiboard - Set Item Color --> Changes the multiboard's (default is last created multiboard) colors to (100%, 100%, 100%) with 0% transparacy. (The color values are Red, Green, Blue and 100% transparacy is compleatly invisable.
Multiboard - Set Item Width --> Changes the multiboard (default is last created multiboard) width to a % of the multiboards total width.
Multiboard - Set Item Icon --> Changes the multiboard (default is last created multiboard) for the set column and row to have a cirten icon
For people who dont know how to make those triggers and variables like what is above then you can download this example multiboard I made that is the same as the picture above (the multiboard is is like the Multiboard SD_Ryoko as posted in the free trigger codes post but Is modded to be more easy to understand and simple to use.

You can download this map from our Free Trigger Thread.

NOTE! You must first go into the world editor and click File -> Preferences and set it up so it automatically makes the variables needed for the copied trigger(s). Example below

hope this helps :D
 
Status
Not open for further replies.
Top