[Trigger] Vision not being given by script

Level 6
Joined
Apr 5, 2013
Messages
153
  • Player Death
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Gangster
    • Actions
      • Sound - Play PeasantDeath <gen>
      • Game - Display to (All players) the text: ((Player[(Player number of (Owner of (Dying unit)))] + has been killed!) + )
      • Set DeathPoint = (Position of (Dying unit))
      • Wait 2.00 seconds
      • Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility from DeathPoint to a radius of 100.00
      • Visibility - Create an initially Enabled visibility modifier for Player 2 (Blue) emitting Visibility from DeathPoint to a radius of 100.00
      • Visibility - Create an initially Enabled visibility modifier for Player 3 (Teal) emitting Visibility from DeathPoint to a radius of 100.00
      • Visibility - Create an initially Enabled visibility modifier for Player 4 (Purple) emitting Visibility from DeathPoint to a radius of 100.00
      • Visibility - Create an initially Enabled visibility modifier for Player 5 (Yellow) emitting Visibility from DeathPoint to a radius of 100.00
      • Visibility - Create an initially Enabled visibility modifier for Player 6 (Orange) emitting Visibility from DeathPoint to a radius of 100.00
      • Visibility - Create an initially Enabled visibility modifier for Player 7 (Green) emitting Visibility from DeathPoint to a radius of 100.00
      • Visibility - Create an initially Enabled visibility modifier for Player 8 (Pink) emitting Visibility from DeathPoint to a radius of 100.00
      • Visibility - Create an initially Enabled visibility modifier for Player 9 (Gray) emitting Visibility from DeathPoint to a radius of 100.00
      • Visibility - Create an initially Enabled visibility modifier for Player 10 (Light Blue) emitting Visibility from DeathPoint to a radius of 100.00
      • Unit - Create 1 Gravestone for Neutral Passive at (Position of (Dying unit)) facing Default building facing degrees
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Human\Polymorph\PolyMorphDoneGround.mdl
      • Special Effect - Destroy (Last created special effect)
      • Floating Text - Create floating text that reads (- + Player[(Player number of (Owner of (Dying unit)))]) at ((Position of (Dying unit)) offset by 50.00 towards 90.00 degrees) with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Create floating text that reads (" + (gravetext[(Player number of (Owner of (Dying unit)))] + ")) at ((Position of (Dying unit)) offset by 80.00 towards 90.00 degrees) with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Custom script: call RemoveLocation(udg_DeathPoint)
The visibility modifier does not work. I had a more tidy version of it before trying to change it. What gives?
 

Dr Super Good

Spell Reviewer
Level 60
Joined
Jan 18, 2005
Messages
26,837
Trigger is not MUI (if two units die at once it will bug) due to the use of a global variable instead of a local variable (JASS only feature).

A reason why the vision modifier might not be working is that 100 radius is quite small. It might not be sufficient to enumerate any fog of war at some death locations depending on how fussy it is. Try setting it to 128 or 256.
 
Top