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

[General] Custom Unit Line of Sight?

Status
Not open for further replies.
Level 14
Joined
Nov 13, 2017
Messages
733
Hello! I wonder if there is a way to modify the in-game files or code system to make custom line of sight from polar radius (default) to a custom one like this:
skill-jpg.289389


SCENARIO:
* I wanted to make unit A to stealth move near unit B without B seeing and proceeding to auto attack.
* The triangular shape is supposed to be my desired line of sight or field of view of the facing of the unit(s) instead of circular area of view.
* I had old problems that units still engage on foes that comes within their range of sight even if their facing is not direct to the foe. (Prolem)
 

Attachments

  • skill.jpg
    skill.jpg
    144.7 KB · Views: 346
Level 13
Joined
Oct 18, 2013
Messages
691
Good luck trying to do this with default API, you're going to need to use Memory library to pull something like that off
 
Level 11
Joined
Jun 2, 2004
Messages
849
Not plausible. Line of sight is shared between all units of a player for one thing, and trying to limit sight through procedurally generated line of sight blockers (to make the cone vision) would be hellish to implement and would likely cause problems when two units get close to each other.
 
Level 8
Joined
Oct 4, 2016
Messages
208
You can play with dumny units that have a fixed circular vision, for example, a line of sight of 32, then create a formation of dummies that form a pseudo-triangle, in each unit that has this function and move it periodically to the current unit according to its angle.
You have to keep in mind that:
- Real units have no vision.
- Disable the attack of the units, to prevent auto acquiring targets.
Check periodically if any unit is visible (enter the unit's vision area) and then remove the ability to disable attack.
This is a vague idea, but I think it is possible.
 
Status
Not open for further replies.
Top