• 🏆 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!

Basic Knowledge in Regions

GUI

Basic Knowledge in Regions


This tutorial is for new map makers who would like to learn the basics in using regions. With the examples given, I am sure that they can get information that regions are important in a map.
Region prop.jpg

What Are Regions?

Regions are map cells used as reference to many actions that a mapper wants to occur in his map. They are invisible in the game and can be removed using triggers.

Regions need triggers to reference them so that they can be properly used. Otherwise, they will have no effect in the game. They can be used to set off triggers or to delineate areas a trigger will affect.

You can rename a region as you like. Be sure that the name you will give to that region will not confuse you at the time you will use it. You can also reset the color of a region. You may re-size a region. Just left-click the region you'd like to re-size to select it. left-click hold at the edge of that region to re-size it as you desire.

What Are Regions' Use?

Regions are used as reference.

1. In choosing hero in a Hero Arena. See This Tutorial for detailed explanations about Hero Arena.
2. Creating Special Effects
3. Spawning/creating Units
4. Killing/removing units from the game
5. Moving units from one region to another
6. Weather effects
7. visibility
8. Destructible animation

Actually, there are many actions that can occur referencing a region but just to give you some ideas on how you can use regions here are some triggers that I can give you for now.

I have already done taking a look with the leaks on these triggers.


TRIGGERS
Hero Arena
  • Select Hero
    • Events
      • Unit - A unit enters Mountain King <gen>
    • Conditions
      • (Entering unit) Equal to Wisp 0003 <gen>
    • Actions
      • Unit - Create 1 Mountain King for (Owner of (Entering unit)) at ((Owner of (Entering unit)) start location) facing Default building facing degrees
      • Unit - Hide Mountain King 0001 <gen>
      • Unit - Remove (Entering unit) from the game
      • Selection - Select (Last created unit) for (Owner of (Entering unit))
The trigger above uses a region to create a unit when another unit enters that region. it should always be that the "Mountain King", which is pre-placed in the map and is visible, should be removed from the game to create the effect that the once "Mountain King" who is not yours becomes yours when you come near him.
create unit
  • Spawn units
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Set TempLocA = (Center of Region 000 <gen>)
      • Unit - Create 1 Villager (Male 2) for Player 1 (Red) at TempLocA facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_TempLocA)
The trigger above creates a male villager every 5 seconds. The region is used for creating a unit. Location should be removed using custom script to prevent leaks and lags.
move unit
  • Move Units
    • Events
      • Unit - A unit enters Region 000 <gen>
    • Conditions
      • (Unit-type of (Entering unit)) Equal to Villager (Male 2)
    • Actions
      • Set TempLoc = (Center of Region 002 <gen>)
      • Unit - Order (Entering unit) to Move To TempLoc
The trigger above uses a region as a reference to order a unit to move to another region.
Special Effects
1. Special Effects can be created on a region using the trigger below. Take note that we have stored the location in a variable. This is to remove leaks in our map.
  • Special Effect on Region
    • Events
      • Time - Elapsed game time is 10.00 seconds
    • Conditions
    • Actions
      • Set TempVodoLoc = (Center of Region 002 <gen>)
      • Special Effect - Create a special effect at TempVodoLoc using Abilities\Spells\Orc\Voodoo\VoodooAura.mdl
      • Set voodoo = (Last created special effect)
      • Custom script: call RemoveLocation(udg_TempVodoLoc)
2. Special Effects on a unit is created using this trigger. The region is used as a reference in creating the special effect. Once a unit (such as the Villager man as I use in this tutorial) enters a certain region, special effect is created.
  • Special Effect on unit
    • Events
      • Unit - A unit enters Region 001 <gen>
    • Conditions
      • (Unit-type of (Entering unit)) Equal to Villager (Male 2)
    • Actions
      • Special Effect - Create a special effect attached to the right hand of (Entering unit) using war3mapImported\4.Armageddon (Fat).mdx
      • Set Armageddon = (Last created special effect)
The trigger shown above creates special effect on 1. A region; and, 2. A unit as the unit enters that region.
Removing Units
  • Remove units
    • Events
      • Unit - A unit enters Region 002 <gen>
    • Conditions
      • (Unit-type of (Entering unit)) Equal to Villager (Male 2)
    • Actions
      • Special Effect - Create a special effect attached to the chest of (Entering unit) using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
      • Set MassTeleport = (Last created special effect)
      • Wait 1.00 seconds
      • Special Effect - Destroy MassTeleport
      • Unit - Remove (Entering unit) from the game
The trigger above also uses a region as reference to create special effect attached to the unit. It also removes unit from the game.
Terrain Deformation
  • Terrain deformation
    • Events
      • Time - Elapsed game time is 2.00 seconds
    • Conditions
    • Actions
      • Set TempLoc1 = (Center of Region 000 <gen>)
      • Set TempLoc2 = (Center of Region 002 <gen>)
      • Environment - Create a 0.50 second wave deformation from TempLoc2 to TempLoc1 with radius 256.00, depth 96.00, and a 1.00 second trailing delay
      • Custom script: call RemoveLocation(udg_TempLoc1)
      • Custom script: call RemoveLocation(udg_TempLoc2)
Above is a trigger that creates deformation in a region. Take note that the Locations are removed. This is to ensure that our map is leak free.
Visibility
  • ]visibility
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility across Region 004 <gen>
The trigger above creates visibility across specified region. You should, of course, have to pick where you will place the region for the visibility to occur.
Destructible Animation and Creating Destructible
  • destructible animation
    • Events
      • Time - Elapsed game time is 10.00 seconds
    • Conditions
    • Actions
      • Animation - Queue Summer Tree Wall 1160 <gen>'s death animation
      • Animation - Change Summer Tree Wall 1160 <gen>'s animation speed to 50.00% of its original speed
      • Animation - Play Summer Tree Wall 1160 <gen>'s death animation
      • Wait 2.00 seconds
      • Destructible - Hide Summer Tree Wall 1160 <gen>
      • -------- using the region as reference in creating destructible after the animation --------
      • Set TreeLoc = (Center of Region 005 <gen>)
      • Destructible - Create a dead Summer Tree Wall at TreeLoc facing (Random angle) with scale 1.00 and variation 0
      • Custom script: call RemoveLocation(udg_TreeLoc)
The trigger above uses a region as reference in creating destructible (dead Summer Tree Wall) after the animation.
1. Set Locations (regions) in a variable.
2. identify which action should happen first. Look closely how the actions take place in the trigger shown above.
3. Always bear in mind that correct order of actions is important.
4. Remove Locations to eliminate leaks.

Weather Effects
The triggers below use regions as reference in creating weather effects. On the first trigger I use Ashenvale Rain. This effect is turned off on the second trigger so that another Weather Effect will be created [See Weather effects on region Copy].

TRIGGER 1
  • Weather effects on region Copy 3
    • Events
      • Time - Elapsed game time is 2.00 seconds
    • Conditions
    • Actions
      • Environment - Create at Region 004 <gen> the weather effect Ashenvale Rain (Light)
      • Set Weather[1] = (Last created weather effect)
      • Environment - Turn Weather[1] On
TRIGGER 2
  • Weather effects on region Copy
    • Events
      • Time - Elapsed game time is 8.00 seconds
    • Conditions
    • Actions
      • Environment - Turn Weather[1] Off
      • Environment - Create at Region 004 <gen> the weather effect Rays Of Light
      • Set Weather[2] = (Last created weather effect)
      • Environment - Turn Weather[2] On
Removing the Weather Effect
If you think that a certain weather effect is not needed in the map anymore you may remove it using the action below:
  • Environment - Remove (Last created weather effect)
.

NOTE: the (Last created weather effect) in the trigger above can be replaced with your stored weather variable.
regions.jpg


NOTE
I hope that this tutorial helps you. If you still need more information on how to use regions, you can do experiments on using them. Don't rush yourself in knowing too much. I think there are still tutorials here like mine. Try to look for those tutorials.

The map for this tutorial is View attachment Regions (tutorial).w3x.
 
Last edited by a moderator:
can you add more things to the tutorial
if it's "basic" tutorials about regions
add more basic things like weather effects, or deformation(if it was correct o.o?)

If a new mapmaker downloads the map suggested, he will know that there are still more "Actions" that can occur in a region as reference. Weather effect is included in the map...:ogre_haosis:
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,197
You do not cover the important fact that a region comprises of map cells added or removed using rects or individual cells at a point.

What you make that is a square of a certain size and position in the WorldEdit is a rect that has been mislabled. The unit enters/leaves region events in GUI actually create the region internally so you have no access to region objects in GUI.

If you plan to use the point at the centre of a rect repetitivly (you can not get the point at the centre of a region) then you are advised to store it in a variable or make it constant as it is more efficient than retreiving it again and again (avoid this if the rect will move as then you will have caching difficulties).
 
You do not cover the important fact that a region comprises of map cells added or removed using rects or individual cells at a point.

What you make that is a square of a certain size and position in the WorldEdit is a rect that has been mislabled. The unit enters/leaves region events in GUI actually create the region internally so you have no access to region objects in GUI.

If you plan to use the point at the centre of a rect repetitivly (you can not get the point at the centre of a region) then you are advised to store it in a variable or make it constant as it is more efficient than retreiving it again and again (avoid this if the rect will move as then you will have caching difficulties).

Great goodness... What you have said is really a very useful guide for newbies... thanks doc...
 
Last edited:
Level 16
Joined
Apr 4, 2011
Messages
995
Sigh . . .

Don't use green color for the text. It is highly recommended to use colors sparingly in tutorials

Fix your english. I don't know if it is your first language or not. But this is an English speaking site. Use proper English free of mistakes.

This tutorial is for new map makers who would like to learn the basics in using regions. With the examples given, I am sure that they can get some information
that regions are important in a map. A map without region(s) isn't a good map. I have not seen a map that do not use regions, send me one if there is.

First sentence, of instead of in. Second sentence just sounds stupid and the indent isn't needed. the (s) shouldn't be in parenthesis, just write regions (because it isn't possessive). Fourth sentence also just sounds really stupid. Get a person familiar with the langauge to write it, or pay more attention to sentence fluency and grammar yourself. Your entire tutorial is plagued with these kinds of mistakes.

Capitalize any word that isn't a word such as "the", "but", "or", "and", or "for" in titles and headers.

You leak in your first and third triggers, not to mention all those triggers with SFX will leak them unless they are destroyed.

Don't use waits in triggers

I hope that this tutorial helps you. If you still need knowledge or more information on how to use regions, you can do experiments on using
regions. Don't rush yourself in knowing too much. Getting knowledge takes time. I think there are still tutorials here like mine. Try to look for those tutorials

Yes that tutorial took 3 minutes to read, on an easy subject that I taught myself not even 30 minutes after the first time I opened the WE, is too much knowledge for one sitting.

Overall, if I was a mod I would reject this tutorial. It's a subject that almost everyone knows (approx. 98% is my guess), the tutorial is an obnoxious green, the triggering is bad, and your english looks like you've only spoken english for 3 months. If it does get approved in it's current state, it's getting a 1/5
 
Top