Quote: "Sure man! Just use zones or invisible objects that trigger a different hud depending on how close the player is to the lightsource."
Exactly what I was thinking. This feels very possible, it just requires a little extra work, as does everything quality.
What I've done is whipped up a simple script that should be attached to an object near the light source. See the attached picture. Note the object I placed there has a black (invisible) texture, the screenshot was taken in the editor. I've added this script to it:
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\huds\red.dds,hudname=red,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\huds\green.dds,hudname=green,hudhide=1,hudmake=display,state=1
:state=1,plrdistfurther=75:hudshow=green,hudunshow=red,state=2
:state=2,plrdistwithin=75:hudshow=red,hudunshow=green,state=1
Please note that not every light needs to define the hud(s), that only has to be done once. The script can go further as well, if you include more states it would be very easy to implement hidden, partially exposed, fully exposed etc.
Also one thing to point out, the radius of the light is 75, so the same distance was used in the script.
Hope this helped,
Burger
- An Instinctive Fear IndieDB page, download demo today!