HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

A better visibility system?

05-19-2007, 02:32 AM#1
Maegus
I've been racking my head trying to come up with a way to give units a visibility cone, rather than the simple wide visibility circle that units currently have.

I originally gave my test unit 0 sight range and then simply had a flying 'satellite' unit that would be moved to a place in front of the test unit every .25 seconds, and it would see for the unit, providing the "cone," and that seemed to work fine. But then I realized that visibility would not be blocked by cliffs and trees. I couldn't find any way around that.

Then I tried to simply mask the area behind the test unit with fog of war/black mask, but both appear to appear/disappear too slowly for my method to work effectively.

I'm sure that *someone* has accomplished this by now; any thoughts or references?
05-19-2007, 06:54 PM#2
Anitarf
I'm not sure anyone has accomplished this by now.
05-19-2007, 06:59 PM#3
blu_da_noob
Your only realistic option seems to be the whole 'satelite units providing the vision' thing, but with some detection of terrain/doodad obstacles. Would only be viable for a small number of units though.
05-19-2007, 07:06 PM#4
Anitarf
You could also try giving your units very little vision range, and calculating all long range vision dynamicaly and casting faerie fire on units accordingly or something similarly far fetched.
05-19-2007, 07:55 PM#5
Maegus
Argh. Oh well. I'd try to make the satellite idea work if I could detect cliffs with triggers and not just units/doodads. And calculating the vision with triggers alone is just beyond me. Thanks anyways.
05-20-2007, 10:32 AM#6
MaD[Lion]
what about using visibility modifier and do mathematic calculation to detect obstacles?
05-20-2007, 10:41 AM#7
Anitarf
I don't think it's feasible to do this in Jass in real time. Perhaps you could preprocess it and store the data to GC, but...