""Grant shared vision of unit" gui function not working?

Level 5
Joined
Mar 16, 2014
Messages
87
The unit, grant shared vision of unit action is not working for me. This trigger I have posted is in fact detecting enemy heroes under a certain amount of HP to give my hero ("Slicer") various ability bonuses, but it is not giving vision of the targets for some reason.

A portion of my code is cut off from the copy as text function, but it's checking for enemy heroes under 35% HP and giving vision of them, and taking away vision of enemy heroes over 35% HP.

Code:
Stalker Check
    Events
        Time - Every 0.50 seconds of game time
    Conditions
        (Slicer_Player is in DeadPlayers) Equal to False
        (Slicer is alive) Equal to True
    Actions
        Set TempInt = 0
        Set StalkerPoint = (Position of Slicer)
        Set StalkerGroup = (Units within 1000000000.00 of StalkerPoint matching ((((((Matching unit) is A Hero) Equal to True) and ((Matching unit) Not equal to SlicerBrotherKiller)) and (((Owner of (Matching unit)) is an enemy of (Owner of Slicer)) Equal to True)) and ((Percentage lif
        Custom script:   call RemoveLocation (udg_StalkerPoint)
        Unit Group - Pick every unit in StalkerGroup and do (Actions)
            Loop - Actions
                Unit - Grant shared vision of (Picked unit) to (Owner of Slicer)
                Set TempInt = (TempInt + 1)
        Custom script:   call DestroyGroup(udg_StalkerGroup)
        Set StalkerPoint = (Position of Slicer)
        Set StalkerGroup = (Units within 1000000000.00 of StalkerPoint matching ((((((Matching unit) is A Hero) Equal to True) and ((Matching unit) Not equal to SlicerBrotherKiller)) and (((Owner of (Matching unit)) is an enemy of (Owner of Slicer)) Equal to True)) and ((Percentage lif
        Custom script:   call RemoveLocation (udg_StalkerPoint)
        Unit Group - Pick every unit in StalkerGroup and do (Actions)
            Loop - Actions
                Unit - Deny shared vision of (Picked unit) to (Owner of Slicer)
        Custom script:   call DestroyGroup(udg_StalkerGroup)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                SlicerBrotherKiller Not equal to No unit
                (SlicerBrotherKiller is alive) Equal to True
            Then - Actions
                Unit - Grant shared vision of SlicerBrotherKiller to (Owner of Slicer)
                Set TempInt = (TempInt + 1)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                TempInt Greater than 0
            Then - Actions
                Unit - Add Slicer Book  to Slicer
                Player - Disable Slicer Book  for (Owner of Slicer)
                Unit - Set level of Slicer Cleave  for Slicer to (TempInt + ((Level of Stalker  for Slicer) - 1))
                Unit - Set level of Slicer Drunken Brawler  for Slicer to (TempInt + ((Level of Stalker  for Slicer) - 1))
                Unit - Set level of Slicer Attribute Bonus  for Slicer to (TempInt + ((Level of Stalker  for Slicer) - 1))
            Else - Actions
                Unit - Remove Slicer Book  from Slicer
 
Level 22
Joined
Feb 27, 2007
Messages
3,785
Use "Units in Playable Map Area" instead of "units within 10000000.00", there's no reason to do it that way. Won't fix the problem, I don't see it. Best guess is that you forgot to change the comparison to greater than in the second group pick where you look for > 35% hp to remove their shared vision, since that would immediately remove the vision from everything you just added it for and make it appear like the vision command isn't working.
 
Top