|
First of all, the basics to the WC3 Triggers:
What is with this Trigger called Melee Initilization?
If you are a former Starcraft player, you remember the modes of play, such as Use Map Settings, Melee, FFA, Team Melee - Thats all gone now! The trigger they give you for free in a new map is the trigger for a melee map! If you take this out, your map will not do anything like it would in a melee map, like removing the creeps, creating starting units, setting hero limits and stuff like that.
Folders
If you noticed by now, on the left there is a bar that has Folders and Triggers. Folders are just there to make organizing your triggers easier. For example, you could make a folder for each wave in a defense map if you wanted.
Triggers(Pages)
Triggers are what makes a custom map... Custom. They are made up of Events, Conditions, and Actions. A trigger has to be placed in a folder, and may not contain any symbol in it's name. If you select a trigger, there are two checkboxes: Enabled and Initally on. If a trigger is not Enabled, it will not run at all, and there will be no way to turn it on ingame. If a trigger is Initally OFF, however, it will not work until you run it using another action, or if you use another action to turn it on.
Variables
What are they, Starcraft fans? If you remember switches, which could be true or false, then you know what one type of variable is.
Variables can hold info, like what someone said ten minutes ago, or what the strength of a hero is right now. They can even remember the last 20 units you made!
Ability
This type of variable remembers a type of ability, like Heal. You could use this if Red chose an ability for all the heroes to learn, and then have a trigger give all the heroes this ability!
Boolean
These can be set to true or false, like starcraft's "Switches".
For example, if you made a room, and made it so when a hero entered, it would remember he entered the room if he ever entered again.
Camera Object
You will not use this very often, but this is used to remember the new "Cameras" in WC3. I don't have any idea what to use these variables for, except maybe having a different camera for each player.
Destructible
This will hold a single Destructible, or a Doodad that can be attacked. An often used idea for this kind of variable is to open a specific door when the hero walks up to it.
Destructible-Type
This will remember a type of destructible, like a Crate. You could use this to create a different kind of doodad in several places quickly, if the type of doodad you wanted to make changed (like random trees, for example).
Defeat Condition
Defeat Conditions are conditions that cause a quest to be marked as failed. If any defeat condition is true, the quest is failed. You can commonly use this for quests requiring something to be alive.
Dialog
Without this type of variable, you can't make your own neat little boxes that pop, like when you lose or win. A dialog variable is the actual dialog that pops up, is added buttons to, ect. Please note that the game has no way of telling what player clicked the dialog button, so you must have a dialog variable for every player.
Dialog Button
If you want something to happen when somebody clicks a button on your dialog, then you must have one of these. To set this variable after the button is created use Set Variable = Last Created Dialog Button. An example of this is, if you click on what you want to transform into like in the changeling, then your unit will be replaced.
Game Cache
This is handy for organizing different caches, or basically files that can be carried over onto diffent maps. I don't have an example here.
Game Speed
You can change the speed of the game now, unlike in starcraft multiplayer. Use this to remember what the original game speed was.
Integer
For those of you who are not computer geeks, this means "any number", which means you can as far down as -2147483648 or as high up as 2147483647. There are unlimited uses for this: Use it to remember how many items a hero has, how many players there were, how many kills a player has, the EXP of a hero, the wave of monsters you are on, like I said, endless! The only bad thing about integers are that they cannont hold decimals. Reals can hold decimals, and Integers can be converted into Reals.
Item
Use this to refer to a specific item. You could use this to automatically drop a flag at a point, or to give that item instantly to another hero, and more.
Item-Type
Use this for changing types of items. If you want to make a different item everytime a hero does something, use this kind of variable.
Leaderboard
Use this to refer to one leaderboard. You can use this in maps with more than one type of mode. Like Free For All Kills and Flags captured, and that kind of stuff.
Order
Use it to remember an order given. I know one way you can use this: If you have a hero, and several units not owned by you behind it, lets say you gave the hero an attack order. You can use the order variable to give all the units behind it that same order.
Player
Use player to remember a specific player. Lets say a hero picks up an item. Then, the player that picked it up would get 1 gold every second. Its kinda like a gold producing thingomabob.
Player Color
Use this to remember the color of a player. Sounds useless?
Well, how bout this? If the color of the player changes, and he couldnt remember what color he was, he could do something to get his old color back, since it would be remembed in the variable!
Player Group
Use it to refer to a bunch of players, but not in specific. The common use for this is putting players In a "red team" or "blue team".
Point
Use this to remember an EXACT point on the map. In my map Machine Gun Marines, I used this variable to remember where my unit started out, so if it died, it would respawn there, and I wouldn't need a location.
Quest
Use this to refer to a specific quest. Most commonly used to remove them after they've been completed, since after they are made there is no other way to remember them except Last created Quest.
Quest Requirement
This has no actual role in weather a quest is won or lost, it's just there to tell the players whats up and if it's been completed. Use this to remember a specific Quest Requirement. You can use this to mark a specific aspect of the quest (for example, 1: bring the bowl to the house 2: Open the door ) as done.
Race
This remembers the race of a player, or if you have UMSWE, the race of a unit. Lets say you want to make a unit that fits whats brought into a location (like a human footman and a human paladin, or a night elf archer and a night elf Demon Hunter). ou can use this variable to remember what race it was.
Real
These are just like Integers, and can be converted into them. The difference is that the game uses these more often, like when figuring out the stats of units, where integers are used more with triggers. Another difference is the ability to use decimals, to be more specific. Lets say you wanted to increase the HP of a unit by 0.9 every second (11 seconds to get 1 HP lol), well thats something integers have a bit of trouble with!
Region(Rect)
They renamed Locations to Regions in WC3, and scrapped the High/Medium/Low ground thing. Basically, Region variables arent used that much, since there is a low use for them. You can use the region variables to remember where weather effects are, or where a group of units are located, ect. The correct term for regions is Rects, short for rectangles. An actual region is much different.
Region(Collection of Rects)
This opens up bold possibilities. Remember, the real regions are going to be called regions here, and the normal ones will be called their right name, Rects. A region is a Rect Group, to say the least. You can use the regions in events to detect if a player enters any rect inside of a region. If you don't understand that, think of it this way: If a unit enters any forest, triggers can detect it entered a forest with just one event. This is accomplished by adding the rects over the forest to a region, which means that all of the rects over a forest will now be in the Forests Region. If a unit enters a rect in the forest region, the trigger runs. Cool eh?
Sound
The Sound variable is used to refer to a specific sound. Lets say you have ten sounds playing at once, but only want to stop number 7. Use a sound variable to remember it, and then stop it with a trigger.
Event ID
Not really sure what this is for, its a UMSWE add-in that will let you identify events. No example for this.
Special Effect
If you plan to create cool stuff on units or on the map, you will need a way to take them off! Make sure you set it right after it is made, or else you will NEVER be able to remove it, unless it is a special effect that dissapears after a while. I used this in Machine Gun Marines to take the flag being "carried" on the unit off.
String
This is very useful, it has many different uses that people don't seem to utilize. Strings are simply this: a line of text. Anything that can be typed is a string. You can use this to remember the name of a player's first unit, or to remember the colors for text, the player's name, if you want.
Tech-Type
Remembers a type of upgrade. You can use this to automatically max out the type of upgrade being learned.
Timer
Without this, you cannot make timers! Like Dialogs, the variable IS the Timer. Timers are not visible until a timer window is made for them. People use these all the time (no pun intended), to show how long it is until the next level, or the end of the game.
Timer Window
Use this to refer to a specific timer window. There can be several timer windows open at once. Lets say we want everyone to see how long it takes a killed player to respawn. When he finally does, it gets rid of the specific timer window.
Trigger
Use it to refer to a specific trigger. The most common use is to Enable/Disable different triggers like this.
Trigger Condition
I don't know if this is a UMSWE add-in or not, but it supposedly remembers a specific trigger condition.
Trigger Action
I don't know if this is a UMSWE add-in or not, but it supposedly remembers a specific trigger action.
Unit
This variable is highly used in RPGs, and in some other games as well. The idea of this is to refer to a specific unit even if it is not on the map to begin with.
Unit Group
Use this to refer to a lot of units, but not in specific. You must use a trigger to add units to a Group variable. An example you say? Hmm... lets say a unit walks into a location. Add it to a unit group variable to make the game remember it's been there.
Unit-Type
Use this to remember a specific type of unit. Ever play golems? Lets say somebody chooses a Rock Golem. A trigger is told to make the unit-type variable. The unit-type variable is set to Rock Golems, and of course, rock golems are created. But say you chose mechanical golems, then, the unit-type variable would be set to mechanical golems. Then, the trigger would start making mechanical golems. Understand?
Unit-Targeted Unit Order
Use it to refer to an order issued to a unit by a player that involves another unit. I cant think of a use for this, its another UMSWE add-in.
Ground-Targeted Unit Order
Use it to refer to an order issued to a unit by a player that involves empty terrain. Still, no use for this, UMSWE Add-In.
Destructible-Targeted Unit Order
Use it to refer to an order... God do you ride the short bus to school?... issued to a unit by a player that involves a doodad. Yet again, no known use, UMSWE Add-In.
Untargeted unit order
Use it to refer to a unit that was issued an order with no target (stop, hold position, cancel, ect.)
Unit Order
I dont know what makes this much different from the order variable, its just another UMSWE Add-In.
Visibility Modifier
Use it to refer to some special area that allows you vision or no vision. You can use this variable to turn the effect on / off, like in MRP1-91P.
Weather Effect
The final variable, use the weather effect to refer to a special weather effect being applied somewhere. Use it to make it look like rain or snow while time passes.
Notes about arrays
Arrays are very cool, they allow you to have more than one variable in one variable. For example, a unit array will let you list as many units as you want in a single variable. The catch? you must give it a number. Like player 1's unit would be Units[1] and player 2's unit would be Units[2] and so on. |
|