Jump to content
Sign in to follow this  
Millenium7

Scripting: Any way to determine how much light is on a unit?

Recommended Posts

I'm working on a stealth mission that essentially overrides the stock AI's ability to detect or engage units, as I find it woefully lacking when it comes to 'stealth'

Now, units are more alerted, but not necessarily alarmed by sights or sounds and may look at or investigate an area without being certain anything is there. Instead of being either 'aware' or 'unaware' of ones presence with no middle ground

The problem i'm having is a long lasting one. Light has absolutely no impact whatsoever on AI visibility. Even if I stand in front of a spotlight the AI won't see me. I don't really care about the standard behaviour, but are there are scripting commands that can tell me my 'illumination'?

I realise I can check for proximity to any fixed lights, but that doesn't work for aimed lights (flashlights, spot lights) and would make standing behind a light, the same as in front of a light

Additionally. Any way to increase or decrease lights range and intensity? I want flashlights to be more powerful and cover a longer range

Share this post


Link to post
Share on other sites

Object setlightintensity number;

Or

_light setlightintensity 1;

The funny thing is I have tried it with a number of combinations of ambient light, brightness etc. could only really get the light to show in pitch black using 9 or 10. I actually thought to begin with it would be 1 to 0.1.

Have a play about with it and let me know what happens..

Share this post


Link to post
Share on other sites

I tried that with a campfire and flashlight and it did absolutely nothing

Share this post


Link to post
Share on other sites

The Mando Angles function might help. You may be able to use it to determine if a flashlight is pointed towards a stealth unit (within an angle range to handle widening cone of light), plus limit distance you decide a flashlight projects, and go from there. Good luck.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×