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

[Spell] Passive hidden spell with unobstructed vision

Status
Not open for further replies.
Level 11
Joined
Sep 11, 2013
Messages
327
Greetings! I need some help.. again..:peasant-bowing:
After a specific time expire. I need to add a hidden passive spell to 3 heroes on the map. Each of those 3 players has only 1 hero. Somehow like this..
  • Final
    • Events
      • Time - END expires
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Unit_Group_Max_3_Players and do (Actions)
        • Loop - Actions
          • Unit - Add Unobstructed vision to (Picked unit)
Well, the problem is.. i want to made a passive hidden abilty (i can change button position y,x to 0,-10 for example) and i want that passive to give unobstructed vision for each hero. That passive must see around the hero like a flying unit, but i Don't want to make the hero to fly. Also, i Don't want to see the invisible units with this passive. 3500 unobstructed vision range around each hero will be great.
Can anyone help me to make this passive spell?
The help will be appreciated!
 
Level 20
Joined
Feb 27, 2019
Messages
592
I think you need to trigger it. I am not aware of any ability that does what youre asking.

I have a similar thing but for 2 reasons. Reason ONE is to give flying type vision to a ground unit. Reason TWO is to allow an instant Teleport Staff ability to target the ground unit or a point without interupting the ground unit.

What I did was create an invulnerable flying unit with locust and move it to the position of the other unit each 0.20 seconds. I chose 0.20 seconds because I believe that is how often the fog updates.
  • Move Shadow Pig
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in AllPigs and do (Actions)
        • Loop - Actions
          • Set VariableSet Int = (Player number of (Owner of (Picked unit)))
          • Set VariableSet TempPoint = (Position of AllPigsArray[Int])
          • Unit - Move ShdwPg[Int] instantly to TempPoint
          • Custom script: call RemoveLocation(udg_TempPoint)
BUT since you only need vision there is no reason to use a unit. You can use visibility modifiers instead.
Sloppy Init trigger but you get the idea.
  • Vision Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Press ESC to kill P...
      • Set VariableSet IsDead[1] = False
      • Unit Group - Add Paladong 0000 <gen> to VisionGroup
      • Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility from TempPoint to a radius of 3500.00.
      • Set VariableSet VisionModifier[1] = (Last created visibility modifier)
  • Vision Update
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in VisionGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • IsDead[PlayerNumber] Equal to False
            • Then - Actions
              • Set VariableSet PlayerNumber = (Player number of (Owner of (Picked unit)))
              • Visibility - Destroy VisionModifier[PlayerNumber]
              • Set VariableSet TempPoint = (Position of (Picked unit))
              • Visibility - Create an initially Enabled visibility modifier for (Player(PlayerNumber)) emitting Visibility from TempPoint to a radius of 3500.00.
              • Set VariableSet VisionModifier[PlayerNumber] = (Last created visibility modifier)
              • Custom script: call RemoveLocation(udg_TempPoint)
            • Else - Actions
  • Vision Death
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set VariableSet IsDead[(Player number of (Triggering player))] = True
      • Wait (Unit: (Triggering unit)'s Real Field: Death Time (seconds) ('udtm')) game-time seconds
      • Visibility - Destroy VisionModifier[(Player number of (Triggering player))]
  • Vision Revive
    • Events
      • Unit - A unit Finishes reviving
    • Conditions
    • Actions
      • Set VariableSet PlayerNumber = (Player number of (Triggering player))
      • Set VariableSet IsDead[PlayerNumber] = False
      • Set VariableSet TempPoint = (Position of (Triggering unit))
      • Visibility - Create an initially Enabled visibility modifier for (Player(PlayerNumber)) emitting Visibility from TempPoint to a radius of 3500.00.
      • Set VariableSet VisionModifier[PlayerNumber] = (Last created visibility modifier)
      • Custom script: call RemoveLocation(udg_TempPoint)
 

Attachments

  • vision.w3m
    19.3 KB · Views: 7
Level 11
Joined
Sep 11, 2013
Messages
327
I think you need to trigger it. I am not aware of any ability that does what youre asking.

I have a similar thing but for 2 reasons. Reason ONE is to give flying type vision to a ground unit. Reason TWO is to allow an instant Teleport Staff ability to target the ground unit or a point without interupting the ground unit.

What I did was create an invulnerable flying unit with locust and move it to the position of the other unit each 0.20 seconds. I chose 0.20 seconds because I believe that is how often the fog updates.
Hello and thanks for your help!
I have some problem with your test map and i am not able to implement the system in the main map because i don't understand how..
I still think something is not working properly...
I tried all day, but i still have bad knowladge in using world editor :D
I will like much if you can help me through Discord(A Future End#8167), it will be much easier to explain/understand..

So.. I made this demo map for you to see, why i don't know how to implement your system..
Each player from Team 2 has 3 choices for example: (2 players can chose the same hero and 1 player can chose different hero) or (3 same hero) etc..
How can i add the vision system on each one?..
If one hero die, the vision must be disabled for the dead hero, but must remain for the rest which are still alive
 

Attachments

  • How to Fix this vision.w3m
    34.1 KB · Views: 14
Last edited:
Status
Not open for further replies.
Top