Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / HUD reacts to lighting?

Author
Message
AmazingGaming
11
Years of Service
User Offline
Joined: 23rd Sep 2012
Location: Good Question....
Posted: 19th Jun 2013 03:43
Hello, is there a way to create a HUD script where lets say in the dark at a certain ambient lighting your hud would change...like penumbra for example..hard to explain but its the best i can :$
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 19th Jun 2013 16:40 Edited at: 19th Jun 2013 16:43
Hi AmazingGaming
Quote: "at a certain ambient lighting your hud would change"

I just looked thru the sytax list and I couldn't find a condition for "ambience" or anything for a work around. Only to set "ambience". Maybe someone has a trick up their sleeve.
Only thing I see is that you reset your hud when your ambience changes.
best
Wolf
16
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 20th Jun 2013 00:56
Sure man! Just use zones or invisible objects that trigger a different hud depending on how close the player is to the lightsource.



-Wolf

http://www.serygalacaffeine.com
Without struggle,no progress and no result.Every breaking of habit produces a change in the machine.
Burger
11
Years of Service
User Offline
Joined: 22nd Jun 2012
Location: New Zealand
Posted: 20th Jun 2013 11:44 Edited at: 20th Jun 2013 11:46
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:



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!

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-04-27 02:58:39
Your offset time is: 2024-04-27 02:58:39