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

Vision Activated Triggers

Status
Not open for further replies.
Level 3
Joined
Dec 19, 2016
Messages
45
I have been exploring the editor, and one thing I am trying to figure out is have a trigger get activated by having vision on an area/region. Thank you in advance for the help! :D
 

EdgeOfChaos

E

EdgeOfChaos

True, there is no such function. But there are only a few ways that you can gain visibility of an area at all:

- Unit in range (provides sight to player and all Shared Vision allies)
- Visibility Modifier
- Reveal skill cast
- Unit attacks from fog
Maybe a few I'm forgetting?

Anyways, these events are easily detectable. So you can probably put together something for what you need
 
Level 8
Joined
Jul 29, 2010
Messages
319
there is a way to do it actually, give me a bit and i'll give you a map, the triggers will be a little complex, nothing major though

EDIT:
something along the lines of this i'd assume, you need to create a dummy unit at the position of your units target, if that dummy unit is created inside a region have it then check if the dummy unit is a certain distance from you hero, if it is say 200 from your unit then have it run a trigger
  • when you issue an order
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Sylvanas Windrunner
    • Actions
      • Set targetedpoint = (Target point of issued order)
      • Unit - Create 1 Dummy Unit for (Triggering player) at targetedpoint facing Default building facing degrees
      • Set Dummyunit = (Last created unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Region 000 <gen> contains Dummyunit) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Dummyunit is in (Units within 200.00 of Yourunitpos)) Equal to True
            • Then - Actions
              • Quest - Display to (All players) the Quest Update message: Works
            • Else - Actions
        • Else - Actions
          • Do nothing
 
Last edited:
Level 25
Joined
May 11, 2007
Messages
4,651
This one works:
  • Visible
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
      • ((Center of Region 1 <gen>) is visible to Player 1 (Red)) Equal to True
    • Actions
      • Game - Display to (All players) the text: Player 1 can see th...
Turn the trigger off with Trigger - turn off (this trigger)
if you only want it to run once.
 

Attachments

  • Dztest12.w3x
    276 KB · Views: 170
Status
Not open for further replies.
Top