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 / Enemies & Light

Author
Message
Uthink
18
Years of Service
User Offline
Joined: 30th Sep 2006
Location: State of Confusion
Posted: 15th Dec 2008 19:12
Does lighting effect your enemies ability to see you?
If not, it's gonna stink to have to script changing the sight parameters on all enemies.

Basically, I will have a light (entity) in a room. If you shoot and destroy it I'd like to destroy a light marker (if possible). If that's not possible I won't use a marker and will just change the ambient level. Either way, I want the room dark. That being said, I don't want enemies to be able to attack you.

Sound feasible?

"Everyone has a plan 'till they get punched in the mouth" -- Mike Tyson
The Next
Web Engineer
16
Years of Service
User Offline
Joined: 3rd Dec 2007
Location: United Kingdom
Posted: 15th Dec 2008 19:16
I think it is controlled via scripting not the actual light source.

Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 15th Dec 2008 20:23
...Jason Brook is 100% correct. This is accomplished through scripting, and has nothing to do with the current ambient light.

This topic has been discussed before. A search will yield the answers that you seek...


Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 15th Dec 2008 22:51
I do recall a portion of code behind the "PLRCANBESEEN" conditions that dealt with how light effected their ability to see you, however from experience it doesn't seem to effect it much, if at all.


The one and only,


meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 15th Dec 2008 23:47
Well, I released a stealth script, but I could make a new set to be better, the old one was kinda primitive, just gimmie the wor if ya want me to


*slap!*
Quiet yourself, think before posting, and maybe you won't be as ignorant as you seem.
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 16th Dec 2008 00:58
Quote: "Basically, I will have a light (entity) in a room. If you shoot and destroy it I'd like to destroy a light marker (if possible). If that's not possible I won't use a marker and will just change the ambient level. Either way, I want the room dark. That being said, I don't want enemies to be able to attack you.

Sound feasible?"

Sure it is just use a variable for a flag.
Initialize the variable to zero.
Then, set it to any other value, lets say one for simplicity, when you flip off the light.
Also, have a condition that checks the value of that variable in the attack state of the characters script.
If it equals zero then the light is on and you would advance to a state of attack.
If it equals one then the light must be shot out and you would advance to an idle state for the character.

So, what you are talking abou is a customized attack script, and a light script to increment the variable on destroy.

Each light could be based on a different variable, so this would only affect the characters in that room using that particular light.

Yes, it is very feasible.

Don't forget to visit Conjured Entertainment

Login to post a reply

Server time is: 2024-11-24 16:30:59
Your offset time is: 2024-11-24 16:30:59