Tutorial Triggers for newbs (in 2 different languages) Netherlands and English

LoveTD's

New Member
Reaction score
34
Hi everyone I know this is a bit strange but the problem is: When I see all these tutorials it's kinda difficult for me to understand all these difficult words so i'm making an tutorial about triggers for newbs in dutch and english so that we can better understand the tutorials (with we I mean all guys that agree with me who are dutch :p)

So here's the original version in dutch the translated will be posted also...:

Trigger tutorial:

1. Wat zijn triggers?

2. Hoe werken triggers?

3. Waarom gebruik je triggers in een spel?

4. Het maken van goed werkende triggers.







1. Wat zijn triggers?

Triggers zijn stukjes scripttaal gemaakt door de mensen die warcraft 3 hebben gemaakt. Deze "triggers" worden gebruikt om het maken van spellen op warcraft 3 gemakkelijk te maken. Triggers kunnen dus voor haast alles wat je in een spel kunt zien en doen gemaakt worden. Je hebt ontzettend veel soorten "actions, conditions en events" (wat ik later ga uitleggen) 1 van die "actions" is het toepassen van de scripttaal die gebruikt is voor het maken van de triggers (Jass) maar daar gaat deze tutorial niet over....
Dus de conclusie over triggers is: Triggers zijn stukjes script die gebruikt worden voor het maken van spellen op warcraft 3


2. Hoe werken triggers?

Een trigger is een klein stukje in het spel een "event". Een event is een tijdstip of iets anders wanneer de trigger moet gaan beginnen met werken. (Let op: een trigger wordt van boven naar beneden en van links naar rechts gelezen, dus het gene wat boven staat gebeurt eerst...) Een voorbeeld:
Code:
elapsed game time
    Events
        Time - Elapsed game time is 1.00 seconds
    Conditions
    Actions
Dit betekent dat deze trigger gaat beginnen als er 1 seconde van de "gametime" = speeltijd van het spel is "Elapsed" = afgelopen Zo zijn er nog veel meer, nog een voorbeeld:

Code:
Itemss
    Events
        Unit - A unit Acquires an item
    Conditions
    Actions

Deze gaat dus beginnen als een poppetje een wapen, schild oftewel "item" krijgt, koopt, vind etc... na de events komen de "Conditions" dit betekent dat de trigger alleen werkt als de condition waar is. Een voorbeeld:

Code:
Item Copy
    Events
        Unit - A unit Acquires an item
    Conditions
        (Item-type of (Item being manipulated)) Equal to Mijn Schild
    Actions

Dit betekent dat de trigger gaat werken als iemand een item krijgt en dat de trigger alleen werkt als "( item being manipulated )" = de item die het poppetje bezit "= equal to ( Mijn Schild )" = is hetzelfde als "Mijn Schild" = de item waar het over gaat...
Het kan ook zo zijn dat je meerdere events en/of conditions hebt bijvoorbeeld als je wilt dat ie gaat werken als iemand een item krijgt OF als iemand in een regio stapt "Unit - A unit enters a region" een region is een regio die je zelf neer kan zetten in een spel, maar dat leg ik een andere keer wel uit...
En bij Conditions bijvoorbeeld als je wilt dat de item die je draagt alleen werkt voor maar 1 type poppetje, dus bijvoorbeeld jij hebt een schild en de trigger gaat werken maar je wilt dat hij alleen werkt als het type poppetje van speler 2 het heeft of als niemand anders deze trigger mag gebruiken... een voorbeeld:

Code:
Item Copy
    Events
        Unit - A unit Acquires an item
    Conditions
        ((Unit-type of (Triggering unit)) Equal to Een kip) and ((Item-type of (Item being manipulated)) Equal to Mijn Schild)
    Actions

dus: "Unit type of triggering unit" = het type poppetje van het poppetje waar de trigger over gaat (in dit geval het poppetje die een item krijgt) "= equal to (een kip)" = het type poppetje is een kip en dan pas gaat hij werken.
Na de conditions komen de "actions" dit zijn de acties die in de trigger worden ondernomen dus een voorbeeld:

Code:
Item Copy
    Events
        Unit - A unit Acquires an item
    Conditions
        ((Unit-type of (Triggering unit)) Equal to Een kip) and ((Item-type of (Item being manipulated)) Equal to Mijn Schild)
    Actions
        Item - Remove (Item being manipulated)

Dit betekent dat de item dat gedraagt wordt door een kip (Let op, dit gebeurt zo snel dat je niet eens weet dat hij hem heeft, om zoiets te voorkomen heb je nog meer acties, voeg gewoon een wait 3 seconds action voor de remove action neer) meteen wordt weggehaald zodat je het niet kan zien, en om de trigger af te maken zal ik nog wat actions toe voegen, dit is het resultaat:

Code:
Item Copy
    Events
        Unit - A unit Acquires an item
    Conditions
        ((Unit-type of (Triggering unit)) Equal to Een kip) and ((Item-type of (Item being manipulated)) Equal to Mijn Schild)
    Actions
        Item - Remove (Item being manipulated)
        Game - Display to Player Group - Player 1 (Red) the text: Een kip kan geen sc...
        Player - Add (Integer(de hoeveelheid geld dat het item heeft gekost)) to Player 1 (Red) Current gold

Dit betekent dat als een poppetje een item krijgt en het poppetje is een kip en de item is een schild dat dan het item wordt weggehaald en dat er een text voor speler 1 komt te staan met: een kip kan geen schild dragen -_-"
daarna wordt het geld er weer bij opgeteld wat de kip kwijt was geraakt aan het schild... Nu ga ik wat vertellen over variables... variables zijn dingen die je tussen triggers in kan gebruiken... een voorbeeld: jij wilt dat er 20 poppetjes in een regio komen en dat ze dan gaan beginnen met bewegen... daarvoor moet je eerst een variable maken een integer variable die je in een trigger met map initialize op 20 zet... dan doe je in een trigger create (jouw variable) facing default building degrees voor een player in (jouw regio) en dan kan je altijd die variable voor in een andere trigger ook gebruiken of 2 keer in dezelfde enzovoorts... dit is hoe triggers werken, als iemand nog op of aanmerkingen hebben kunnen ze dat posten...

3. Waarom gebruik je triggers in een spel?


Triggers gebruik je omdat zonder triggers het enige wat je kan maken is: een terrein, een paar objecten, ability's, shops enz... maar alle andere dingen moeten verder worden gedaan met triggers, niemand kan mij vertellen dat hij een goed werkend spel dat (Leuk is) zonder triggers of Jass kan maken... (voor de betwetertjes onder ons als je denkt dat het wel kan omdat jouwe goed werkt als melee map... kijk eens wat voor triggers je gebruikt: Juist ja, je ziet een map: "initialize" met daarin 1 trigger, deze trigger is een ingebouwde melee map functie voor als je een melee map maakt, daarom is het ook handig als je triggers gebruikt in je spel om die map weg te halen...)
Dus in het kort: Zonder triggers kan je bijna onmogelijk een spel maken (tenzij je jass kan...)

4. Het maken van goed werkende triggers.

Eerst is het handig om te bedenken wat je wilt laten gebeuren in je spel...
Daarna probeer je er werkelijkheid aan te verbinden door de event te beginnen dus waneer moet het beginnen, wat moet er eerst gebeuren...
daarna ga je bedenken voor wie de trigger werkt en wie niet, of er conditions bij moeten of niet.... daarna ga je bedenken wat er moet gaan gebeuren (Let op de gebeurtenissen moeten in de goeie volgorde soms werken ze anders niet...) Ow en nog een hele goeie tip: gebruik niet dingen die niet op de trigger slaan... bijvoorbeeld:

Code:
FOUT
    Events
        Map initialization
    Conditions
        (Unit-type of (Triggering unit)) Equal to Footman
    Actions
        Unit - Remove (Triggering unit) from the game

Dit heeft dus helemaal geen zin...
omdat je triggering unit gebruikt en dat slaat niet op de event, de event zegt: als de map nog laadt en de condition zegt: als het poppetje waarvan de map laadt hetzelfde is als footman dan moet je het poppetje waarvan de map laadt weghalen, tuurlijk begrijpen jullie dat dit HELEMAAAAAL niet klopt...
Ik kan jullie een goed werkende trigger laten zien... wat ik wilde is:
als iemand -agi max typt dan gaat all je geld weg en is het alsof je alleen maar agility tombs met je geld gekocht hebt... om dit te doen heb ik dit gedaan:

Code:
Agility attribute bonusses with max
    Events
        Player - Player 1 (Red) types a chat message containing -agi max as An exact match
        Player - Player 2 (Blue) types a chat message containing -agi max as An exact match
        Player - Player 3 (Teal) types a chat message containing -agi max as An exact match
        Player - Player 4 (Purple) types a chat message containing -agi max as An exact match
        Player - Player 5 (Yellow) types a chat message containing -agi max as An exact match
        Player - Player 6 (Orange) types a chat message containing -agi max as An exact match
        Player - Player 7 (Green) types a chat message containing -agi max as An exact match
        Player - Player 8 (Pink) types a chat message containing -agi max as An exact match
        Player - Player 9 (Gray) types a chat message containing -agi max as An exact match
        Player - Player 10 (Light Blue) types a chat message containing -agi max as An exact match
    Conditions
    Actions
        Unit Group - Pick every unit in (Units owned by (Triggering player) of type Paladin) and do (Hero - Modify Agility of (Picked unit): Add (((Triggering player) Current gold) / 9))
        Player - Add (0 - ((Triggering player) Current gold)) to (Triggering player) Current gold

en zo maak je dus goed werkende triggers, veel success










-----------------------------------------------------------------------








now to have the translated version (excuse me for bad english, tell me when I say things wrong)....:

Trigger Tutorial:

1. What are triggers?

2. How do triggers work?

3. Why do we use triggers in a game?

4. The making of a good working trigger.






1. What are triggers?
Triggers are pieces of scriptinglanguage made by the people who made warcraft 3.
These “Triggers” are used to make games on warcraft 3 as easy as possible.
Triggers can be used by almost every aspect of the game. You’ve incredibly much different functions in a trigger the “Actions, Conditions and Events” (what is gonna be explained later)
1 of these “Actions” is applying a scripting language called: Jass, but that’s not where this tutorial is about… So the conclusion about triggers is: Triggers are pieces of scriptinglanguage that are being used to make games on warcraft 3



2. How do triggers work?

A trigger is an little piece in the game an "event". An event is a timepoint or something else the trigger has to start for. (Warning: you have to read an trigger from up to down and from the right to the left, so the thing that’s been put first is the first one to start...) an example:

Code:
elapsed game time
    Events
        Time - Elapsed game time is 1.00 seconds
    Conditions
    Actions

This means that the trigger will start when the gametime is been going on for 1 second and that way there are many more events, another example:

Code:
Itemss
    Events
        Unit - A unit Acquires an item
    Conditions
    Actions

This trigger is going to work when a unit acquires an item that means it picks an item up or gains an item in anny way... After the event there will be the "Conditions" this means that the trigger will only work if the condition is true. For example:

Code:
Item
    Events
        Unit - A unit Acquires an item
    Conditions
        (Item-type of (Item being manipulated)) Equal to My shield
    Actions

This means that if the trigger is going to work if someone gets an item “item being manipulated” = equal to “My shield” this means the item has to be of type: My shild…
It could be that youll have more than one events... and/or conditions for example if you want the trigger to work not only if a unit acquires an item but ALSO when somebody gets into your region… "Unit - A unit enters a region" a region is an region what you can put into your map but I’ll explain that another time… And with conditions for example if you want to let the trigger only work for one type of unit and only if it’s your item type… so if you have a shield and the trigger is going to work but you only want to have the trigger work for a special unit type for example if player 2 has different type’s of units or if no one may use this trigger except for some special type... another example:

Code:
Itemsss
    Events
        Unit - A unit Acquires an item
    Conditions
        ((Unit-type of (Triggering unit)) Equal to A chicken) and ((Item-type of (Item being manipulated)) Equal to My shield)
    Actions

so: "Unit type of triggering unit" the unit type of the unit using the trigger (in this case the unit that acquires an item) "= equal to (a chicken)" = the type of the unit is a chicken…And then the trigger will work…
After the conditions we have the “Actions” these are the actions that will be used when running this trigger… for example:

Code:
Itemssss
    Events
        Unit - A unit Acquires an item
    Conditions
        ((Unit-type of (Triggering unit)) Equal to A chicken) and ((Item-type of (Item being manipulated)) Equal to My shield)
    Actions
        Item - Remove (Item being manipulated)

This means the item that’s being carried by an chicken will be removed...(Warning, this happens so fast that you don’t even know if the chicken has the item...to avoid this use the wait 3 seconds action and put it before the remove item action…) And to end the trigger with some nice actions this is the result:

Code:
Items
    Events
        Unit - A unit Acquires an item
    Conditions
        ((Unit-type of (Triggering unit)) Equal to A chicken) and ((Item-type of (Item being manipulated)) Equal to My shield)
    Actions
        Item - Remove (Item being manipulated)
        Game - Display to Player Group - Player 1 (Red) the text: A chicken can't use a shield you morron -_-"
        Player - Add (Integer(Your item cost)) to Player 1 (Red) Current gold

This means that if a chicken gets an item and the item is a shield it wil remove the item and says the text message: A chicken can’t carrie a shield you morron -_-“
And after that it will add the gold you’ve used to buy your shield... Now I’m gonna tell you guys something about variables: Variables are used to store things between triggers, this can be dialog’s units integers etc…an example: You want to have 20 units spawn in a region and start to get moving… first you have to make an integer for the units and then an integer for how many you want to have, then you’d make something like: create (integer variable) (unit variable) at (your region) facing default building degrees for (your player) first you would obviously have to set the integer and unit variable into a trigger with map initialize as event...
And then you would always be able to use the variable in another trigger... This is how triggers work if annyone has questions, any comments etc then please post it… But please don’t start again about my grammar... I suck in that :p



3. Why do we use triggers in a game?

We use triggers because without triggers you won’t be able to make an good workinf (fun) game. The only thing you can make without triggers are some abilities, shops, units objects doodads terrain etc...But all these actions in your game must be done by triggers (or jass) So no one can tell me that he made an really good game without triggers or Jass (And for the ones who thinks that they are smart: if you think you can make an good melee map without triggers then you’re wrong. Look in the triggers you use Yep if you look good you will see an map with initialize on it. Open it and you will have 1 trigger thats an default trigger for melee maps thats why it’s always usefull if you want to make an completely different map to delete that trigger.)
So to say this all a bit more short: Without triggers it’s almost impossible to make games (unless you are good with Jass)


4.The making of a good working trigger.

First of all it’s good to think about what you want to happen in game... Then you need to try to make reality to it, first start thinking about When does it needs to start and what must happen first. (the Event). Then you should have to make an conclusion, for who do I want this trigger to work and what conditions are there? (conditions) Then you need to consider what is going to happen…(Warning: the actions needs to be in the good order.) Ow and a great tip of making triggers DON’T USE THINGS THAT DOESN’T WORK WITH THE EVENTS!:

Code:
WRONG
    Events
        Map initialization
    Conditions
        (Unit-type of (Triggering unit)) Equal to Footman
    Actions
        Unit - Remove (Triggering unit) from the game

So this doesn’t work at all! That’s because triggering unit has nothing to do with the event, now it wil say this: when the map loads I want that if the unit of the loading map if it is equal to a footman that it removes it…. Please don’t make such mistakes, I hope you see what’s wrong cause if you don’t you will never understand triggers…I could show you guys a good working trigger, look this is what I wanted: I want that if A player types –agi max that it will buy as many agility tombs as possible, so you wont have anny gold left, this is the trigger to do that:

Code:
Agility attribute bonusses with max
    Events
        Player - Player 1 (Red) types a chat message containing -agi max as An exact match
        Player - Player 2 (Blue) types a chat message containing -agi max as An exact match
        Player - Player 3 (Teal) types a chat message containing -agi max as An exact match
        Player - Player 4 (Purple) types a chat message containing -agi max as An exact match
        Player - Player 5 (Yellow) types a chat message containing -agi max as An exact match
        Player - Player 6 (Orange) types a chat message containing -agi max as An exact match
        Player - Player 7 (Green) types a chat message containing -agi max as An exact match
        Player - Player 8 (Pink) types a chat message containing -agi max as An exact match
        Player - Player 9 (Gray) types a chat message containing -agi max as An exact match
        Player - Player 10 (Light Blue) types a chat message containing -agi max as An exact match
    Conditions
    Actions
        Unit Group - Pick every unit in (Units owned by (Triggering player) of type Paladin) and do (Hero - Modify Agility of (Picked unit): Add (((Triggering player) Current gold) / 9))
        Player - Add (0 - ((Triggering player) Current gold)) to (Triggering player) Current gold

Thats how to make good working triggers, good luck to all of you. I hope you guys learned much.


Note: It took me 9 hours to translate and make this tutorial so some respect is always welcome :p

Trouwens: ik heb er 9 uur over gedaan om deze tutorial the vertalen en te schrijven dus wat respect zouw fijn zijn :p
 
Reaction score
65
You didn't translate everything! And I have no idea why did you make a non-english version of it?
Dit betekent dat deze trigger gaat beginnen als er 1 seconde van de "gametime" = speeltijd van het spel is "Elapsed" = afgelopen Zo zijn er nog veel meer, nog een voorbeeld:
 

LoveTD's

New Member
Reaction score
34
You didn't translate everything! And I have no idea why did you make a non-english version of it?

sorry about that I would emediatly remove it... the reason why is that guys like me don't always understand english and i'm suggesting to make an dutch site with many tutorials in my language so guys like me can understand it...
 

Corleone

New Member
Reaction score
44
sorry about that I would emediatly remove it... the reason why is that guys like me don't always understand english and i'm suggesting to make an netherlands site with many tutorials in my language so guys like me can understand it...

Dutch. Same goes for the title =P

Anyway, time to read it through.

Edit:
1) Use Code tags please ( looks like a # ). Makes it easier to read the triggers.
2)
niemand kan mij vertellen dat hij een goed werkend spel dat (Leuk is) zonder triggers of Jass kan maken...

Triggers are made in Jass, so that doesn't sound right. Also, I'm sure you can make a cool map without triggers, even though it'll be rather hard.

Same goes for :
Zonder triggers kan je bijna onmogelijk een spel maken (tenzij je jass kan...)

Just to clarify things : GUI = Graphical User Interface = Jass, with a more user friendly interface.
3) "How does triggers work?"
Should be "How do triggers work?". Triggers is plural ;)
 

LoveTD's

New Member
Reaction score
34
ok ill use code tags, maybe some screenshots too? but eather way i don't know how to change the title :p I will try to make every Netherlands to Dutch...
EDIT: lol how would you possibly make a cool map without triggers or jass :p:p:p???

EDIT: better this way?
WITH quote's :p

EDIT:
Triggers are made in Jass, so that doesn't sound right. Also, I'm sure you can make a cool map without triggers, even though it'll be rather hard.

Yeah I know but i don't know how to say it an other way, when you use a custom text accept for triggering

EDIT: maybe a few days later I would have the whole list with actions, events and conditions with an explanation (maybe this may not come true cause I haven't got much time because of school -_-)
 

Corleone

New Member
Reaction score
44
Much better. Code tags make it slightly easier to read, though. Here's an example.

Melee Initialization
Events
Map initialization
Conditions
Actions
Melee Game - Use melee time of day (for all players)
Melee Game - Limit Heroes to 1 per Hero-type (for all players)
Melee Game - Give trained Heroes a Scroll of Town Portal (for all players)
Melee Game - Set starting resources (for all players)
Melee Game - Remove creeps and critters from used start locations (for all players)
Melee Game - Create starting units (for all players)
Melee Game - Run melee AI scripts (for computer players)
Melee Game - Enforce victory/defeat conditions (for all players)

Code:
Melee Initialization
    Events
        Map initialization
    Conditions
    Actions
        Melee Game - Use melee time of day (for all players)
        Melee Game - Limit Heroes to 1 per Hero-type (for all players)
        Melee Game - Give trained Heroes a Scroll of Town Portal (for all players)
        Melee Game - Set starting resources (for all players)
        Melee Game - Remove creeps and critters from used start locations (for all players)
        Melee Game - Create starting units (for all players)
        Melee Game - Run melee AI scripts (for computer players)
        Melee Game - Enforce victory/defeat conditions (for all players)
 

LoveTD's

New Member
Reaction score
34
When I push the edit button I can only use quotes not codes :(
EDIT: n.v.m. just changed the quotes into codes
EDIT: sorry about the jass thingie i'm not familair with jass...
 

Master

Thou shall be helped by...The Black Adder!
Reaction score
72
The code tags are simple:
Code:
quote my post to see them
;)
 

Sooda

Diversity enchants
Reaction score
318
Just to clarify things : GUI = General User Interface = Jass, with a more user friendly interface.

Man hide yourself, GUI means Graphical User Interface.

EDIT: That tutorial is bad it lacks of main theme. Speaking about different events what aren' t linked to one main theme can just interrupt learners mind to consentrate. If you don' t think they can figure out how triggers are functioning how they should understand this better ? Nvm just writing tutorials when you don' t have inaf knowledge isn' t good. Better translate tutorials from tutorial repository or ask someone to translate them for you (For people who would like to read them in native language.).
In my opinion this is more helpful [Taken from Warcraft Readme (R).]:
The Trigger Editor

This is the most advanced and powerful portion of the World Editor. The Trigger Editor allows you to take complete control of every aspect of the game. It is a simplified programming language designed to be accessible to novices, but powerful enough to satiate the desires of more advanced users. To open the Trigger Editor, use F4, or choose Trigger Editor from the Module menu.

A trigger is composed of three parts: events, conditions, and actions. A trigger's actions will activate if, when one of its events occurs, its conditions are met.

Events

Events will start the process that may lead to a trigger's firing. After a trigger's event has taken place, its conditions are evaluated, and finally its actions may occur. The default trigger in a map is "Melee Initialization." This trigger's default event is "Map Initialization." Basically this means that the instant the map finishes loading, its actions will occur: the trigger has no conditions that must be met. If you wanted to, you could change this event to "Time - Time Elapsed," then change the number of seconds to ten. The map would then run the "Melee initialization" trigger ten seconds after it had loaded.

Conditions

Conditions are special requirements that must be met for a trigger's actions to occur. A condition must be true for a trigger's actions to run. This way of thinking about conditions can be deceptive because you can have a condition like "False Equal to False"-- a condition which would always be true. The default trigger "Melee Initialization" contains no default conditions; let's add one. Hit Ctrl + D, then select "Game Speed Comparison." The dialog box will then have the blue text, "(Current game speed) Equal to Normal." If you leave the condition as it is and then run the map from the editor, the "Melee Initialization" trigger will run normally, assuming you have not changed any other parts of the trigger from their default values. However, if you change "Normal" to "Fastest," the "Melee Initialization" trigger will not run from the editor. This is because the editor sets the game speed to "Normal" automatically when you run maps from it. The condition would be evaluated as "Normal speed equal to Fastest speed," a condition which is not true.

Some of the differences between conditions and events are that conditions are only evaluated if the event of the trigger that they fall under has occurred. Also, although a trigger can have multiple events, only one event need occur for a trigger's action to happen, whereas all conditions must be true simultaneously for the trigger's actions to occur.

The only things a trigger really needs are actions. (Well, in point of fact, this is not exactly true. However, a trigger with no actions has no effect on the game and, therefore, no real point in the script.) It is worth pointing out, though, that triggers do not need conditions or events in order for their actions to be carried out in the game. Triggers can be run from other triggers using the action "Trigger - Run (Ignoring Conditions)," which will run any trigger's actions, regardless of its conditions or events or lack thereof.

Actions

Actions are the results of a trigger. These can be anything from panning the camera to a specific unit, as in a cinematic, or having one unit attack another. Actions allow the designer to have complete control of what occurs in the game.

Creating a Trigger

To open the Trigger Editor, hit F4 or select Trigger Editor from the Module menu.

Before you create a trigger, you must have a category to place that trigger in. Create a new category by selecting Category from the New menu. You will see the category you just created in the tree listing on the left. Categories have file icons. You can name a category either by typing its name immediately after you create the new category, or by selecting the category, hitting F2, and typing in the new name.

To create a new trigger, select the category you just created. Then select Trigger from the New menu. Select the trigger that you have just created. You will notice that there are now two checkboxes on the right of the trigger box:

Enabled - If this box is unchecked, this trigger is disabled and cannot be enabled during the game.
Initially On - If this box is unchecked, the trigger will start out disabled, but it can be enabled during the game through the use of the action "Trigger - Turn On". Note that a trigger that is told to run a trigger will ignore the on/off status.

There are also several fields on the right of the trigger box:

Comments - This field is for placing comments that will act as a mnemonic for you and for others who may wish to modify your script. Comments do not affect a trigger's functionality at all; they are for your own personal use in making notes.
Trigger Functions - Here the viscera of your trigger are displayed. You will notice that all of your events, conditions, and actions will be displayed in this part of the editor. If you add an event, condition, or action, it will be organized in its appropriate section here.

You can copy and paste events, conditions, and actions from trigger to trigger, or even from map to map. To edit an event, condition, or action you have already created, all you have to do is double-click that event, condition, or action.

Some other things that you may or may not be familiar with in the editor are variables, functions, and presets.

Variables

You can open the Variables part of the editor by hitting Ctrl + B or by selecting Variables from the Edit menu in the Trigger Editor. These variables behave much like variables in a programming language like BASIC or C. Variables are like buckets that the editor uses to hold certain types of data, but these are fickle buckets: they will only carry one type of data. For example, you cannot place an integer into a unit variable.

With triggers you can refer to objects that are pre-placed on the map. Say you want to use an action on a unit. Then open the action that you want to use on the unit, and left-click the appropriate part of that action's grammar text. The red and blue underlined text delineates the parts of the action that can be modified. Now click the Select a Unit button. Then select the unit on your map. Your selected unit's variable name will now be in the variable list.

Try this: on an empty map, place an Orc Peon. Open the Trigger Editor by hitting F4. Create a category by hitting Ctrl + G. Then create a trigger by hitting Ctrl + T. Use Ctrl + R to create a new action. Hit the u key in the menu and locate the nearby action "Unit - Kill." The grammar text of this trigger is "Unit - Kill (Triggering unit)." Left-click the blue underlined text, "(Triggering Unit)." Left click the button that says, Select a Unit (to the left of the Edit Variables button). Select the Peon. Congratulations! You've associated this trigger with the Peon on your map. All units that are pre-placed on a map have a variable name associated with them.

If you wish to have a more thorough explanation of variables, it is recommended that you learn to program in any computer language. (C++ rules!)

Functions

The Trigger Editor contains many functions to allow users more flexibility and control than past Blizzard editors have been able to provide. Functions are generally used in conjunction with variables and specific data types. An example of a useful function is "Last Created Unit." This function allows you access to the unit that was just created via "Unit - Create," and in fact it is one of only two functions that allow you to refer to a unit that was created during the game's execution (the other being "Last Created Unit Group"). These functions can be used in lieu of a unit variable or a unit that is pre-placed on the map. Remember, though, that functions return values; you cannot manually set a function equal to some value like a variable. You can however set a variable equal to a function.

If, for example, you have just detected via an event that a Hero has leveled, then "Event Response - Leveling Hero" will only refer to that particular Hero. You cannot simply set the function equal to some other Hero, and hope that the World Editor will be happy. If you wish to level a specific Hero, you must use some other way of detecting that Hero (e.g., the event "Unit - Player-Owned Unit Event" and the condition "Unit-Type Comparison"), then use an appropriate action on the Hero, such as "Hero - Set Level."

Presets

Presets are data built into the editor. You do not need to do anything to have them available, and they never change. An example of a preset is "Player 1 (Red)."

Value

Another field you will often be able to modify is the Value field. This field allows you to enter information directly. For instance this field appears on the action, "Game - Text Message (Auto-Timed)". If you left-click the blue underlined word Text, you will open up the String window. The last option in this window will be Value. If you want a simple message, you can type it directly into this field; you do not have to create a new variable or use a function.
Just for your hard work +rep. Because if you really want to help by writing tutorials it' s good sign. Just don' t write tutorials what makes things more complicated or they just give false info.
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
I refuse to read tutorials, where triggers are handwritten and not pasted from the World Editor!
 

Sooda

Diversity enchants
Reaction score
318
Graphical, general.. it's all the same. :p
*Hides*

You call visual things what you can see with your eyes general ? I don' t think so.
Updated my last post with constructive criticism.
 

SFilip

Gone but not forgotten
Reaction score
633
Well its a good tutorial, sure. But apart from the fact you included a Dutch version, its pretty useless as we have some similar tutorials around.
Oh and you might wanna fix this
> and says the text message: A chicken can’t carrie a shield you morron -_-“
since that trigger actually displays "A chicken can't use a shield you morron -_-". And carrie is spelled carry, morron is spelled moron BTW :p

However this might as well be a good idea...it would be great if we could get the people to translate several of those major Ryoko's tutorials to their native languages. This should help those non-english speakers a bit, but then again it might prove to be a waste of time.
 

ayumilove

Youtube account suspended! youtube.com/ayumilove8
Reaction score
110
unique tutorial lolx, got 2 language <3

> its not a waste of time if someone put lots of efforts in it, and that could help people, people who are not so proficient in English but good in other language such as dutch. that also promotes more people coming to this site <3
 

Corleone

New Member
Reaction score
44
However this might as well be a good idea...it would be great if we could get the people to translate several of those major Ryoko's tutorials to their native languages. This should help those non-english speakers a bit, but then again it might prove to be a waste of time.


I might give it a go. Could translate some tutorials to Polish and Dutch.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top