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 / Disable Ambient Light Controls?

Author
Message
Teabone
Valued Member
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Canada
Posted: 19th Oct 2012 03:29
How does one disable the ability for players to control the ambient lighting in build games with "<" and ">"?

BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 19th Oct 2012 04:31
Quote: "How does one disable the ability for players to control the ambient lighting in build games with "<" and ">"?"


The keys are actually "," and ".". There was a thread here but the script posted does not work in my version.

The current source has this section relating to the adjusting of keys.



For us, we modded our source by adding a command that will disable or enable the code block in question. I've tried a few scripts that set the ambience to 50 when the two keys are pressed, but still see the ambience slightly change each time. I don't know of any other way other than modding the source.


There's no problem that can't be solved without applying a little scripting.
Teabone
Valued Member
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Canada
Posted: 19th Oct 2012 04:41
Players basically can cheat by using the ambiant lighting keys for areas where I had planned for them to restore power for the area to become lit. Its a bit disappointing that I cant prevent them from doing this.

BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 19th Oct 2012 05:06
Quote: "Players basically can cheat by using the ambiant lighting keys for areas where I had planned for them to restore power for the area to become lit. Its a bit disappointing that I cant prevent them from doing this."


I understand that completely. That's why we added a command that allows us to enable or disable that section of code. If disabled, they can't change the ambience.

IMO, it should have been an option in the Build Game to allow the ambience to be changed via keys or disable rather than modding the source.


There's no problem that can't be solved without applying a little scripting.
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 19th Oct 2012 10:08
Quote: "(ROLFY) Add 'always' condition to the built levelsetup.fpi, always worked for me.
:state=0,always:ambience=4,ambiencered=255,ambiencegreen=255,ambienceblue=255"


Marc Steene
FPSC Master
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 19th Oct 2012 19:33
Or just have this in a script:

:always:ambience=X where X is your desired ambience


Slenderman's Shadow - Sanatorium
http://forum.thegamecreators.com/?m=forum_view&t=199408&b=35
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 19th Oct 2012 19:46 Edited at: 19th Oct 2012 19:47
@ mah076

Thanks for pointing that out. I'll note that in the book for future reference. I always forget about the ":always:" command.


There's no problem that can't be solved without applying a little scripting.
Teabone
Valued Member
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Canada
Posted: 21st Oct 2012 08:32
Awesome I had no idea that code was there. Thanks a lot guys. Hope this thread proves useful for those using the search for this topic.

Burger
12
Years of Service
User Offline
Joined: 22nd Jun 2012
Location: New Zealand
Posted: 21st Oct 2012 09:03
I always presumed that changing the ambient light was a 'test game only' thing, that's almost ridiculous people can change lighting in built games. I will definitely take note of this in future, as my levels are dark and look terrible if the player can change the lighting at the press of a button.

"I'm inspired by my own wise quotes, thank you." - Burger, 6/7/12
A dude
14
Years of Service
User Offline
Joined: 15th Mar 2010
Location: The Solar System
Posted: 23rd Oct 2012 01:12
Wow. I never new that the ambient lighting could be changed with some keys in the built game! I'm glad there is a way to disable that.

Login to post a reply

Server time is: 2024-11-23 20:01:01
Your offset time is: 2024-11-23 20:01:01