• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Starting with GUI

Level 15
Joined
Aug 18, 2007
Messages
1,390
Welcome
Hi all, i saw alot of people asking for this, so i'd made a tutorial of it.

Getting Started
Triggers looks advanced on first look, ill remmember my first try, wich spawned a peon every second on the map, where it should only spawn one :)
But away from that, i'll introduce you.

Each trigger is divided into 3 parts, Events, Conditions and Actions

Events is WHEN the trigger is excecuted, when the trigger happens
Conditions is what NEEDs to be fullfilled before the actions takes place
Actions is WHAT happens

All Actions, Events and Conditions does excactly what they say, like the action called Unit - Kill, kills a unit :eekani:
That makes sence right?

I will guide you through a simple spawn trigger, then youre on your own!
I want this trigger, to create 3 Peasants at the middle of my map, when a Paladin enters a "region"

Makeing the "region"

First, ill make a region:
1: Click "R" when you're watching your terrain.
2: This will popup: Tutorial2.jpg
3: Click this button wich means "Create Region"
4: Pull out an area on the terrain, like when selecting multiple units ingame.
5: Go rename the region by Right clicking the region name and choose "Rename Region" or "Region Properties"
Now type in Spawn 3 peasants

Now, we got a Region called "Spawn 3 peasants". This is the region we want to have the paladin enter, for spawning some peasants.

We want to make the trigger now, so open the trigger editor, looking like an "A"
Now click the piece of paper, wich got a BOLD frame.

Event, Condition and Action

Now lets make the trigger:
1: Click the Event icon, it looks like a red flag.
2: Find the text called Unit - Unit enters Region
3: You see that Region is red, thats because "Region" is invalid. Click the red text, and under "Varibles" you'll see the Spawn 3 Peasants region!
4: Click the Spawn 3 peasants region, and press "OK"
5: Click "OK" again, as our Event is done! HOORAY!

Now, we need a condition, to tell that we only want it to spawn when its a Paladin who enters.

So, Click the Condition icon, looking like a piece of paper with a green arrow on.
1: Find the text called Unit - type comparison
2: Click the text "Footman" and click the icon of the paladin
3: Press "OK" twice.

(The text wich says "Triggering Unit" means that its the unit were talking about in the event, we could change it to "Entering unit", but right here its unneseary. If we would like to make a trigger wich created a unit for a plyaer, when his unit dies, and kills the unit who attacked, we would have to use "Killing unit" and "Dying Unit" as the event only talks about one of them.)

Now lets make our Action. Press the Action icon, it looks like one of thoose funny movie things.
1: Find the text Unit - Create units facing angle
2: Footman is'ent the unit we want, so click the text, and then the icon of a peasant.
3 now, we would like 3, not one, so click the text "1" and type in "3" instead. Notice that thoose 3 is spawned at the same point!
4: Press ok twice.


DONE!

Voila, were done!
it should look like this: Tutorial1.jpg

When a paladin enters our region, the map creates a unit at the "center of playable map area" wich is the middle of our map.
Thats all from me, if you wonna test the trigger, place a paladin using the Unitpalette, wich can be assced by pressing "U" when looking at the terrain
or by clicking the drop menu at the region pallete and click "Unit".

//Lord_of_Sausage
 
Last edited:
Level 15
Joined
Aug 18, 2007
Messages
1,390
Looks good and usefull. Maybe add a bit of colors and some more examples.
Would also be nice if you add the pic of the trigger editor button.

Beside that, please add a section on variables :p

Variables? aint they a little more advanced? Or is it just me who found out what i could with them after i made maps for a half year? :D
well, i might come up with that, but not yet, i will also add screenies of the different buttons.

Also thanks for rep :D (just noticed ;D)
 
Level 6
Joined
Mar 17, 2008
Messages
150
GhostWolf is right

Variables? aint they a little more advanced? Or is it just me who found out what i could with them after i made maps for a half year? :D
well, i might come up with that, but not yet, i will also add screenies of the different buttons.

Also thanks for rep :D (just noticed ;D)

Yep, Variables are just easy when you understand them a bit. =0
 
Level 5
Joined
Jan 15, 2018
Messages
128
This is great, exactly the kind of thing im looking for as a beginner.

Could you do one where unit enters region and buildings spawn?
- ive seen it before where they come out of nowhere, and also where they are invulnerable and then change when the unit enters or when the research is completed.
 
Top