| 09-01-2006, 03:08 PM | #1 |
Basics of Regions Originally posted 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 I 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). These however are NOT available in GUI and can't be created in the region palette. Contributed by: PitzerMike. Now for the 'Unit enters/leaves 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 was 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). That's why triggers will still fire for the old position, even if you used the 'Move region' to move the region to a different position. 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: Trigger: 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. Trigger: This trigger makes the unit entering "Region 000" move to Region 001 if the entering unit is owned by Player 1. Trigger: 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 :) |
| 09-01-2006, 03:35 PM | #2 |
It might be a good idea (to avoid confusion) to have a note about the fact that GUI 'regions' are actually just 'rects'. |
| 09-05-2006, 08:53 PM | #3 | |||
Quote:
|
| 09-05-2006, 09:07 PM | #4 |
While the WE does use rects, they get routed internally to proper regions. Talking about what regions are could save people from a lot of bugs, particularly with weather and unit enters region events. |
| 09-07-2006, 08:03 AM | #5 | |
I've edited some of the tutorial, however, you're talking about what regions are? Quote:
And bugs with weather? I'm sorry guys but what do you mean actually? Please refresh my memmory, bugs with weather etc. i'm afaid i can't remember those bugs. |
| 09-10-2006, 06:37 PM | #6 |
Ok, here's the deal, Archian: The regions that your tutirial 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) 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 your GUI-region that you 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). So anyway, if you later on use the 'Move Region' trigger action, the rect will be moved, but not the temp region used in the event. So the Event will still fire on the old position of the rect and not the new position. I think it's important for a tutorial about regions to work out the difference between JASS and GUI regions. |
| 09-13-2006, 02:04 PM | #7 |
Oh yes, yes i see, thank you PitzerMike, rep to you Anyway do you want me to simply include this within the tutorial? |
| 09-13-2006, 07:43 PM | #8 |
You should (if you find my wording appropriate). |
| 09-18-2006, 08:14 PM | #9 |
Approved. |
