- Joined
- Feb 6, 2008
- Messages
- 166
Hello. I'm making a map right now, which I believe is an Altered Melee style map. I need help with making triggers, which according to the Triggers and Scripts forum ("Threads regarding the creation of a trigger, how-to-do-this-type, go on the World Editor Help Zone, as do general World Editor-related questions."), I should post here.
I would like to have an efficient system for randomizing player start locations. I just started learning triggers a short while ago, and I'm still very confused. IMO, I'm rather terrible at GUI, and I'm having an even harder time with JASS. The only experience I have with trigger making is with staredit, back when I made maps for Starcraft.
The only proof I can offer to show that I'm not just trying to get "free labor" is that I've been trying to think this through. Currently, my plan is to do this:
1. Create a hashtable to store numbers from 1 to 8. (First question: Are hashtables like tables in Excel? Rows and columns of data?)
2. Randomize the order of the numbers. (Second question: How can I do this? Under hashtable actions, there's only "create x", "save x", and "clear x".)
3. Read the new first number. Player 1 will be given a race selector building will be generated in the region "Base X", depending on the number read. There are regions numbering the potential start locations around the map clockwise. (Struggling with this. All I know is that there is a "Hashtable - Load Location Handle" thing.)
4. Repeat 3, using the second number for player 2, third number for player 3, etc. until all the players have been given a base location randomly.
The race selector building is named "Select Your Race", and its model is that of a Start Location. It has several copies of Channel, each one renamed to the name of a playable race. By using a specific ability, the race selector building will be replaced by the town hall of that race and its corresponding workers will be generated in a nearby region. Also, there is a region on each of the gold mines. If the race selector uses the ability "Undead" or "Night Elf", the trigger will remove the gold mine and in its place create a Haunted Gold Mine or Entangled Gold Mine, respectively.
I also need help understanding what each of the Melee Initialization triggers do. (I would like to know if I'm right or not, or if I'm missing any info.)
Use Melee Time Of Day: I think this one just sets up the clock and starts it like any other melee game. I think I can keep this one in.
Hero Limits: I'm pretty sure this one makes it so that you can't have three Demon Hunters, two Crypt Lords, or five Far Seers from the same person.
Hero Starting Items: This gives all heroes a scroll of town portal when trained.
Set Starting Resources: All players get their starting gold and wood.
Remove Excess Units: This clears out all creeps from used start locations. I don't think I should keep this one, as all my start locations are in the center of the map, and I might put a creep camp there. Also, I should run triggers to clear out all units from a given base before the race selector building is created.
Create Starting Units: I won't be needing this one, because it creates the town hall and workers for whichever race was chosen in the game room.
Run AI: I will probably need this one run if I make this map playable by computers, but then I will need to make custom AIs for the custom races.
Victory/Defeat Conditions: I need to make my own version of this I think. I'm guessing this controls the "2 minutes without town hall = reveal player" thing.
Any help with setting up the triggers and such would be appreciated. If you want, I can give credit in the map info. As I move along in this map project, if anyone wants screenshots for any reason from my map, just ask away. I will definitely do what I can to help you help me. After all, if I can't get the help, it's my loss. Also, I'm not expecting anyone to just give me the triggers I need. I personally prefer tips and hints to guide me in the right direction, so that I learn and understand what's going on.
Edit: I have tried looking through the tutorials, but to be honest, most of the time, I read to the end feeling more confused than before.
I would like to have an efficient system for randomizing player start locations. I just started learning triggers a short while ago, and I'm still very confused. IMO, I'm rather terrible at GUI, and I'm having an even harder time with JASS. The only experience I have with trigger making is with staredit, back when I made maps for Starcraft.
The only proof I can offer to show that I'm not just trying to get "free labor" is that I've been trying to think this through. Currently, my plan is to do this:
1. Create a hashtable to store numbers from 1 to 8. (First question: Are hashtables like tables in Excel? Rows and columns of data?)
2. Randomize the order of the numbers. (Second question: How can I do this? Under hashtable actions, there's only "create x", "save x", and "clear x".)
3. Read the new first number. Player 1 will be given a race selector building will be generated in the region "Base X", depending on the number read. There are regions numbering the potential start locations around the map clockwise. (Struggling with this. All I know is that there is a "Hashtable - Load Location Handle" thing.)
4. Repeat 3, using the second number for player 2, third number for player 3, etc. until all the players have been given a base location randomly.
The race selector building is named "Select Your Race", and its model is that of a Start Location. It has several copies of Channel, each one renamed to the name of a playable race. By using a specific ability, the race selector building will be replaced by the town hall of that race and its corresponding workers will be generated in a nearby region. Also, there is a region on each of the gold mines. If the race selector uses the ability "Undead" or "Night Elf", the trigger will remove the gold mine and in its place create a Haunted Gold Mine or Entangled Gold Mine, respectively.
I also need help understanding what each of the Melee Initialization triggers do. (I would like to know if I'm right or not, or if I'm missing any info.)
Use Melee Time Of Day: I think this one just sets up the clock and starts it like any other melee game. I think I can keep this one in.
Hero Limits: I'm pretty sure this one makes it so that you can't have three Demon Hunters, two Crypt Lords, or five Far Seers from the same person.
Hero Starting Items: This gives all heroes a scroll of town portal when trained.
Set Starting Resources: All players get their starting gold and wood.
Remove Excess Units: This clears out all creeps from used start locations. I don't think I should keep this one, as all my start locations are in the center of the map, and I might put a creep camp there. Also, I should run triggers to clear out all units from a given base before the race selector building is created.
Create Starting Units: I won't be needing this one, because it creates the town hall and workers for whichever race was chosen in the game room.
Run AI: I will probably need this one run if I make this map playable by computers, but then I will need to make custom AIs for the custom races.
Victory/Defeat Conditions: I need to make my own version of this I think. I'm guessing this controls the "2 minutes without town hall = reveal player" thing.
Any help with setting up the triggers and such would be appreciated. If you want, I can give credit in the map info. As I move along in this map project, if anyone wants screenshots for any reason from my map, just ask away. I will definitely do what I can to help you help me. After all, if I can't get the help, it's my loss. Also, I'm not expecting anyone to just give me the triggers I need. I personally prefer tips and hints to guide me in the right direction, so that I learn and understand what's going on.
Edit: I have tried looking through the tutorials, but to be honest, most of the time, I read to the end feeling more confused than before.
Last edited: