MP®
Member
- Reaction score
- 11
Hi I'm making a stealth map, a bit like Ninja vs Samurai and in order to make it possible to backstab someone from behind without being seen, I want the sight to be changed by the units, like this:
Every player has only 1 unit/hero to control, so no big armies, only 12 units must have this type of sight.
I thought about a way to make everything behind the unit 'black' again, and do this every 0,10 second or something. But I dont know how to get this to work.
Another idea I thought of was by placing a dummy right in front of the actual unit every 0,10 sec or something.
Then make the actual unit with occlussion (this is somehow possible, right? so that you can't see through units neither? Like with trees?)
Then make sight range of the actual unit about 30 and make sight range of the dummy normal. Now the dummy does the looking for the actual unit, and because the dummy can't see through the actual unit, it will only show the area in front of the unit.
Here a drawing to make it more clear:
(dark blue circle is the actual unit, light blue circle is the dummy)
The dark blue circle is the actual unit. The light blue circle is the dummy. [not really relevant: the green circle is a tree ]
As you can see, the actual unit will have a bit more sight than I initially wanted, but this is OK too
Will this work you think? And how should I do this without huge memory leaks etc?
How much the units cant see behind them isnt that important, I think the best way is something like 180 degrees in front of them visible and the 180 degrees behind invisible.
Does someone know how to do this? Or is JASS the only way to do this? (I dont know anything about jass)
Every player has only 1 unit/hero to control, so no big armies, only 12 units must have this type of sight.
I thought about a way to make everything behind the unit 'black' again, and do this every 0,10 second or something. But I dont know how to get this to work.
Another idea I thought of was by placing a dummy right in front of the actual unit every 0,10 sec or something.
Then make the actual unit with occlussion (this is somehow possible, right? so that you can't see through units neither? Like with trees?)
Then make sight range of the actual unit about 30 and make sight range of the dummy normal. Now the dummy does the looking for the actual unit, and because the dummy can't see through the actual unit, it will only show the area in front of the unit.
Here a drawing to make it more clear:
(dark blue circle is the actual unit, light blue circle is the dummy)
The dark blue circle is the actual unit. The light blue circle is the dummy. [not really relevant: the green circle is a tree ]
As you can see, the actual unit will have a bit more sight than I initially wanted, but this is OK too
Will this work you think? And how should I do this without huge memory leaks etc?
How much the units cant see behind them isnt that important, I think the best way is something like 180 degrees in front of them visible and the 180 degrees behind invisible.
Does someone know how to do this? Or is JASS the only way to do this? (I dont know anything about jass)