• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Hiding regions (Line of Sight)

Status
Not open for further replies.
Level 20
Joined
Jul 14, 2011
Messages
3,213
Hi!

I'd like to make some regions like Roshan's in DotA, so that they could only be seen if a player is really in it. I tried Sight Blockers but didn't worked
 
Level 17
Joined
Feb 11, 2011
Messages
1,860
Try this:

  • Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Visibility - Create an initially Disabled visibility modifier for (Player((Integer A))) emitting Visibility across Region 000 <gen>
          • Set Visibility[(Integer A)] = (Last created visibility modifier)
  • Give Visibility
    • Events
      • Unit - A unit enters Region 000 <gen>
    • Conditions
    • Actions
      • Visibility - Enable Visibility[(Player number of (Owner of (Triggering unit)))]
  • Remove Visibility
    • Events
      • Unit - A unit leaves Region 000 <gen>
    • Conditions
    • Actions
      • Visibility - Disable Visibility[(Player number of (Owner of (Triggering unit)))]
Note that in the Setup trigger, change the 10 in the loop to how ever many players you have. Hope this helps!
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Did exactly as you said:

  • Visibility
    • Events
      • Time - Elapsed game time is 0.50 seconds
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 2, do (Actions)
        • Loop - Actions
          • Visibility - Create an initially Disabled visibility modifier for Player[(Integer A)] emitting Visibility across Hidden Monk <gen>
      • Set Visibility[(Integer A)] = (Last created visibility modifier)
Did it this way to reduce the loading time.

  • Give Visibility
    • Events
      • Unit - A unit enters Hidden Monk <gen>
    • Conditions
    • Actions
      • Visibility - Enable Visibility[(Player number of (Owner of (Triggering unit)))]
  • Remove Visibility
    • Events
      • Unit - A unit leaves Hidden Monk <gen>
    • Conditions
    • Actions
      • Visibility - Disable Visibility[(Player number of (Owner of (Triggering unit)))]
But didn't worked. It still can be seen from far away =/
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Didn't worked either. I've had already tested that but forgot to report.

Edit: I feel really noob/dumb for the solution i found, but i found it xD.

Made a Pahtable tree with invisible model and Occlusion Sight to 150 around the area... done xD Monk area is hidden hehe
 
Last edited by a moderator:
Status
Not open for further replies.
Top