- Joined
- Mar 29, 2011
- Messages
- 3,763
GUIBasic 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.
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.What Are Regions?
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.
Regions are used as reference.What Are Regions' Use?
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.
TRIGGERSHero ArenaThe 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.
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))
create unitThe 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.
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)
move unitThe trigger above uses a region as a reference to order a unit to move to another region.
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
Special Effects1. 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.
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 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)
The trigger shown above creates special effect on 1. A region; and, 2. A unit as the unit enters that region.
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)
Removing UnitsThe trigger above also uses a region as reference to create special effect attached to the unit. It also removes unit from the game.
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
Terrain DeformationAbove 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.
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)
VisibilityThe 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.
]visibility
Events
Map initialization
Conditions
Actions
Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility across Region 004 <gen>
Destructible Animation and Creating DestructibleThe trigger above uses a region as reference in creating destructible (dead Summer Tree Wall) after the animation.
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)
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 EffectsThe 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
TRIGGER 2
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
Removing the Weather Effect
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
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.
NOTEI 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: