How to set black mask over areas without terrain?

staind25

TH.net Regular
Reaction score
7
I'm sure this is really obvious, and I did do a bit of searching, but couldn't find it. Anyways, I'd like to be able to divide my map into "sections", in a way. When a unit gets teleported to another section, they shouldn't be able to see the other surrounding sections...it should be black.

I've seen this done in a couple maps. Attached is an example (Note: It is NOT my map...I take no credit for it). If you open it up, you'll notice that there's a good portion toward the bottom of the minimap that is black masked. There are a few areas within this that are not black masked, but the other area that has no terrain under it is strictly black and blocked off. I want to accomplish this.

Thanks for your time :)
 

Attachments

  • Helms Deep TFT CA v3[1].3.w3x
    990 KB · Views: 94

Ashlebede

New Member
Reaction score
43
Since I never played your example map (and I am lazy), I do not know exactly what you mean. Try using Line of Sight blockers, which can be found in the Doodads palette, under the Pathing Blockers category.

You can also achieve this using triggers.

You would need three triggers :
• One to call at map initialization
• One to call when a unit enters a black-mask region
• One to call when a unit leaves a black-mask region

Trigger:
  • MyInitTrigger
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Visibility - Create an initially Enabled visibility modifier for (Owner of (Triggering unit)) emitting Black mask across No region
      • Set VisibilityModifier = (Last created visibility modifier)


Trigger:
  • MyTrigger
    • Events
      • Unit - A unit enters MyRegion
    • Conditions
      • (Number of units in (Units in MyRegion matching (((Matching unit) belongs to an ally of (Owner of (Triggering unit))) Equal to True))) Not equal to 0
    • Actions
      • Visibility - Disable VisibilityModifier


Trigger:
  • MyLeaveTrigger
    • Events
      • Unit - A unit leaves MyRegion
    • Conditions
      • (Number of units in (Units in MyRegion matching (((Matching unit) belongs to an ally of (Owner of (Triggering unit))) Equal to True))) Equal to 0
    • Actions
      • Visibility - Enable VisibilityModifier


Notice that you'll need a Visibility Modifier variable. (CTRL+B, as always)
 

staind25

TH.net Regular
Reaction score
7
I'm pretty sure it's simpler than that. I looked at the map that I posted and I don't see any relevant regions or triggers pertaining to this. I did think of that, though...if I can't figure it out, I'll use that. Thanks.

Anyone wanna try to open up the example?

Edit: By the way, you don't have to PLAY the example map. Just open it up with the editor...it's unprotected.
 

Ashlebede

New Member
Reaction score
43
Oh... that...

Well, those are called boundaries and can be accessed through the Terrain Palette. Right under the Blight icon, you have an "Apply Texture : Boundary" button. Click on it.

Have fun adding boundaries. :)
 

staind25

TH.net Regular
Reaction score
7
Ohhhh, so it WAS that obvious! Beautiful. Thanks much, haha.

Apologies, I am a terrain noob. I'm a trigger guy XD
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top