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 )
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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
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!:
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:
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
Trouwens: ik heb er 9 uur over gedaan om deze tutorial the vertalen en te schrijven dus wat respect zouw fijn zijn
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
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
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
Trouwens: ik heb er 9 uur over gedaan om deze tutorial the vertalen en te schrijven dus wat respect zouw fijn zijn