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

Using Regions to Isolate areas?

Status
Not open for further replies.
Level 4
Joined
Aug 17, 2011
Messages
119
Hello,

Is it possible to use Regions to isolate area's on a map? I have a number of small enterable rooms off to the one side behind a masked area. I would like to have ranged units not be able to attack each-other through the 'black-ness'...

I could possibly spam line-of-sight blockers, but can it be done with triggers and regions?
 
Level 4
Joined
Aug 17, 2011
Messages
119
Make a simple trigger for each region:

Event - unit is attacked
If (attacked unit is in region equal to false) Then (order attacking unit to stop).

Would this stop the unit before it fires the first shot?

Visibility Modifiers? Could you explain a bit more please?
 

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
Yes. It would stop the unit before it fires the first shot.
Visibility Modifiers are triggers that create a visibility for a player at target region.
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
It would stop the unit before it starts to animate. The effect is that the archer will just stand still, looking at the target. A move order away from this will be seamless.

For visibility modifiers, you once again separate all the areas into regions. Next, you reduce each unit's sight range to 0. When a player has a unit in an area, you create a visibility modifier for that player in that region, save it to a variable, and destroy it when the player has no more units in the region.

A MUCH simpler method, though, would be to simply use cliffs. Use a large square size -2 cliff level.
 
Status
Not open for further replies.
Top