• 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.

Temporary visibility radius

Status
Not open for further replies.
Level 5
Joined
Dec 3, 2012
Messages
117
So, for this blind skill I want it to actually work as Blind.

So what I'm trying is when a unit is "blinded" I want the units owner to have a modified field of vision;
- Black Mask all around the unit
- Slight radius of visibility around the unit in the black

Crude Paint Example: http://imgur.com/U2p5ZmK

The problem is, I tried creating a temporary black mask for the player and then a visibility modifier radius around the unit, but it doesn't take 2 visibility masks at the same time, it seems =/

  • Blind
  • Blind
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacked unit) is A Hero) Equal to True
    • Actions
      • Set TEMPUnitGroup = (Units of type (Unit-type of HEROPlayerHero[(Player number of (Owner of (Attacked unit)))]))
      • Set TEMPPlayerGroup = (Player group((Owner of (Attacked unit))))
      • Set TEMPPlayer = (Owner of (Attacked unit))
      • -------- Blind Attack Lv 1 --------
      • -------- ---Familiar--- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Attacking unit)) Equal to Familiar
        • Then - Actions
          • Set TEMPInteger = (Random integer number between 1 and 10)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TEMPInteger Equal to 5
            • Then - Actions
              • Set TEMPInteger = 0
              • Visibility - Create an initially Enabled visibility modifier for TEMPPlayer emitting Black mask across (Current camera bounds)
              • Visibility - Create an initially Enabled visibility modifier for TEMPPlayer emitting Visibility from (Position of HEROPlayerHero[(Player number of TEMPPlayer)]) to a radius of 300.00
              • Wait 5.00 seconds
            • Else - Actions
        • Else - Actions
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
Sounds like a bug prone idea. I mean what will happen if the owner of the unit has another unit nearby that is not blinded?

What you are doing also sounds contradictory as you cannot hide and make visible something.

I am not sure if there is a solution in WC3. Maybe a negative occlusion height if you can change that with triggers? In SC2 this is as simple as using a behaviour to modify unit vision but in WC3...
 
What do you actually want? A spell that works for only one unit because what your asking is MPI meaning only one unit per player or do you just want to limit unit visibility? If only for one unit then you can use filters and GetLocalPlayer.

Sounds like a bug prone idea. I mean what will happen if the owner of the unit has another unit nearby that is not blinded?

What you are doing also sounds contradictory as you cannot hide and make visible something.

I am not sure if there is a solution in WC3. Maybe a negative occlusion height if you can change that with triggers? In SC2 this is as simple as using a behaviour to modify unit vision but in WC3...

SC2 everything eh? Glad someone's keeping that alive =)
Isn't making a behaviour to modify unit vision the same thing in WC3 adding a negative or positive goblin scope ability and how would that help this guy even if he was in SC2? The way he designed that it seems he wants it to be MPI, though I could be terribly wrong so I apologize if I am that.

Edit: I don't think the goblin scope ability worked like I thought however you could use dummy-flares/farsights to obtain the same effect with blackmask on.
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
First reason you failed this is because GUI fog modifier actions have limitations.For example delete those 2 visibility actions and these 4 custom script lines:
  • Custom script: set bj_lastCreatedFogModifier = CreateFogModifierRadiusLoc(udg_TEMPPlayer, FOG_OF_WAR_VISIBLE,GetUnitLoc(udg_HEROPlayerHero[GetPlayerId(udg_TEMPPlayer) + 1]), 300.0, true, true)
  • Custom script: call FogModifierStart(bj_lastCreatedFogModifier)
  • Custom script: set bj_lastCreatedFogModifier = CreateFogModifierRect(udg_TEMPPlayer, FOG_OF_WAR_MASKED, bj_mapInitialCameraBounds, true, true)
  • Custom script: call FogModifierStart(bj_lastCreatedFogModifier)
Second reason: I don't know how exactly how visibility modifier work, so you need to help from someone else.It seems first created visibility area is always on top of others etc...

Third:You need to do these things periodically.
 
Status
Not open for further replies.
Top