ragingspeedhorn
Is a Banned Asshole
- Reaction score
- 94
Basics of Regions
by ragingspeedhorn, with some edits by Archian.
Index Of Content:
- What Is A Region?
- Where Do I Find The Place To Add Regions?
- What Do I Use These Regions For?
- You Also Mentioned Custom Weather, What Is That?
- Also Ambient Sound, What Is That? ...And Why Is It Turned Off?!
- Conclusion.
Note: In this tutorial we will explain to you the basics of working with regions, what a region is and some other usefull tips. This tutorial is in no way geared towards experienced modders but is meant as a helpfull hand to the newbeginners within Wc3 modding.
What Is A Region?
A region is a invisible field (ingame that is, in the editor your region is visible when you are using the region palette (but only when using the region palette, though you can change it so it's viewable while you're working in any of the other palettes)) used for triggered events, custom weather for certain areas (the area the region stretches over) and for ambient sound.
The last two being choosable in the individual regions properties and the first in the trigger editor.
The regions that this tutorial is about are called rects in JASS, that is because they are rectangular.
Besides rects JASS does also have the type region which is composed of many tiny sqares, so that you can have regions with any shape you want (for example a circle).
Contributed by: PitzerMike.
Now for the 'Unit enters Rect'-event: When this event is registered with a trigger, WC creates a temporary rectangular JASS-region with the same dimension as the GUI-region that will be specified in the trigger editor. And the event will be registered for that temporary JASS-region, not for the rect (because rects technically don't even have Enter/Leave-Events).
Contributed by: PitzerMike.
Where Do I Find The Place To Add Regions?
Go up in "Layer" and select "Regions", then the "Region Palette" pops up and from that you are able to manage and add new regions. You add the new regions through the grey button.
This is what the Region Palette looks like.
This is how the regions looks like.
As you can see the regions on the picture has different colors, you can change the color of the region inside the region properties (acces the properties by double clicking the region which you wish to change).
What Do I Use These Regions For?
As said before regions are mostly used for triggered events.
Here is some basic examples of a simple trigger involving the "Unit enters region" event:
This trigger will kill any units that enters region "000" if they are of the type Footman.
It is a pretty basic example, a commonly used trigger which involves a region.
This trigger makes the unit entering "Region 000" move to Region 001 if the entering unit is owned by Player 1.
This trigger creates a Footman unit at the center (middle) of Region 001 when a unit owned by any player enters Region 000.
You Also Mentioned Custom Weather, What Is That?
The custom weather is the Weather Effect box. If you wish to have let's say an area where it is raining you create a region over the desired area like shown below.
Once that is done you open up the Region Properties and check out the Weather Effect box.
Once that is done you can choose your desired effect, as an example I have used "Ashenvale Rain (Heavy)".
The Weather Effects which you have to choose from are all the different effects premade by Blizzard which they used in the RoC & TFT campaigns, there are 21 in total. Also you are able to import your own custom Weather Effects, check out THIS tutorial made by CryoniC.
Also Ambient Sound, What Is That? ...And Why Is It Turned Off?!
The reason why you are not able to choose a Ambient Sound right away is because you can only use sounds once you have added them to your map as sounds through the Sound Editor (if you add them as music you will not be able to use them as Ambient Sounds, it needs to be as a sound). As shown below I have added the Credits theme as a sound file and then it becomes selectable in the Region Properties.
Conclusion.
Hopefully with this tutorial you have learned abit more about regions and their basic use, if you got any suggestions for improvements or such please leave a comment
by ragingspeedhorn, with some edits by Archian.
Index Of Content:
- What Is A Region?
- Where Do I Find The Place To Add Regions?
- What Do I Use These Regions For?
- You Also Mentioned Custom Weather, What Is That?
- Also Ambient Sound, What Is That? ...And Why Is It Turned Off?!
- Conclusion.
Note: In this tutorial we will explain to you the basics of working with regions, what a region is and some other usefull tips. This tutorial is in no way geared towards experienced modders but is meant as a helpfull hand to the newbeginners within Wc3 modding.
What Is A Region?
A region is a invisible field (ingame that is, in the editor your region is visible when you are using the region palette (but only when using the region palette, though you can change it so it's viewable while you're working in any of the other palettes)) used for triggered events, custom weather for certain areas (the area the region stretches over) and for ambient sound.
The last two being choosable in the individual regions properties and the first in the trigger editor.
The regions that this tutorial is about are called rects in JASS, that is because they are rectangular.
Besides rects JASS does also have the type region which is composed of many tiny sqares, so that you can have regions with any shape you want (for example a circle).
Contributed by: PitzerMike.
Now for the 'Unit enters Rect'-event: When this event is registered with a trigger, WC creates a temporary rectangular JASS-region with the same dimension as the GUI-region that will be specified in the trigger editor. And the event will be registered for that temporary JASS-region, not for the rect (because rects technically don't even have Enter/Leave-Events).
Contributed by: PitzerMike.
Where Do I Find The Place To Add Regions?
Go up in "Layer" and select "Regions", then the "Region Palette" pops up and from that you are able to manage and add new regions. You add the new regions through the grey button.
This is what the Region Palette looks like.
This is how the regions looks like.
As you can see the regions on the picture has different colors, you can change the color of the region inside the region properties (acces the properties by double clicking the region which you wish to change).
What Do I Use These Regions For?
As said before regions are mostly used for triggered events.
Here is some basic examples of a simple trigger involving the "Unit enters region" event:
Code:
Test Trigger
Events
Unit - A unit enters Region 000 <gen>
Conditions
Unit type of (Entering unit) Equal to (Footman)
Actions
Unit - Kill (Entering unit)
This trigger will kill any units that enters region "000" if they are of the type Footman.
It is a pretty basic example, a commonly used trigger which involves a region.
Code:
Region Trigger
Events
Unit - A unit enters Region 000 <gen>
Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
Actions
Unit - Order (Entering unit) to Move To (Center of Region 001 <gen>)
This trigger makes the unit entering "Region 000" move to Region 001 if the entering unit is owned by Player 1.
Code:
Region Spawn Trigger
Events
Unit - A unit enters Region 000 <gen>
Conditions
Actions
Unit - Create 1 Footman for Player 1 (Red) at (Center of Region 001 <gen>) facing Default building facing degrees
This trigger creates a Footman unit at the center (middle) of Region 001 when a unit owned by any player enters Region 000.
You Also Mentioned Custom Weather, What Is That?
The custom weather is the Weather Effect box. If you wish to have let's say an area where it is raining you create a region over the desired area like shown below.
Once that is done you open up the Region Properties and check out the Weather Effect box.
Once that is done you can choose your desired effect, as an example I have used "Ashenvale Rain (Heavy)".
The Weather Effects which you have to choose from are all the different effects premade by Blizzard which they used in the RoC & TFT campaigns, there are 21 in total. Also you are able to import your own custom Weather Effects, check out THIS tutorial made by CryoniC.
Also Ambient Sound, What Is That? ...And Why Is It Turned Off?!
The reason why you are not able to choose a Ambient Sound right away is because you can only use sounds once you have added them to your map as sounds through the Sound Editor (if you add them as music you will not be able to use them as Ambient Sounds, it needs to be as a sound). As shown below I have added the Credits theme as a sound file and then it becomes selectable in the Region Properties.
Conclusion.
Hopefully with this tutorial you have learned abit more about regions and their basic use, if you got any suggestions for improvements or such please leave a comment