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

Flashlight {how to increase unit's vision?}

Status
Not open for further replies.
Level 14
Joined
Dec 29, 2009
Messages
931
Try this.

  • Item Trigger
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Goblin Night Scope
    • Actions
      • Set Temp_Point00[(Player number of (Owner of (Triggering unit)))] = (Position of (Triggering unit))
      • Visibility - Create an initially Enabled visibility modifier for (Owner of (Triggering unit)) emitting Visibility from (Position of (Triggering unit)) to a radius of 500.00
      • Set Temp_ItemVisMod00[(Player number of (Owner of (Triggering unit)))] = (Last created visibility modifier)
  • ItemLost Trigger
    • Events
      • Unit - A unit Loses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Goblin Night Scope
    • Actions
      • Visibility - Destroy Temp_ItemVisMod00[(Player number of (Owner of (Triggering unit)))]
      • Custom script: call RemoveLocation(udg_Temp_Point00[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
Very basic, easy to use, and works. I've included a test map, in case you are the type that likes to CnP triggers (I understand, we've all done it before).

Just don't forget to remove the Ultravision (item) ability from the item, if you're basing it off the Goblin Night Scope (like I did, lol).
 

Attachments

  • TestMap.w3x
    18.5 KB · Views: 126
@Arkon Kaos your doesn't increase unit vision sight, but just creates visibility modifier in target area, so only position where item has been taken will generate sight, and when taken is disappears. Also it leaks location.

From what I understand, you want to increase unit sight, not reveal given area right, A-Mexican-Taco?
Here is my test map, its MUI and properly gives/removes vision & properly checks state of hero equipment when hero is revived.
 

Attachments

  • Increase Visibility.w3x
    23.1 KB · Views: 141
Last edited:
There is an ability ( to find it CTRL + F enter Item Sight Range Bonus ) and add it to the item. It will work :) No dummies, or triggers
Hah, I have forgotten about that since I though guys before me checked object editor already. My test map still works great but adding this ability (rawcode 'Alsi') is just simpler. However, if you want to manipulate day sight in differend way than night vision (for egzample in day +250, in night +100) dummy unit creation system proves to be better.
 
Status
Not open for further replies.
Top