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 / Flashlight Problem: Dynamic Entities (Enemy) always just fully black :(

Years of Service
User Offline
Joined: 19th Oct 2016
Posted: 17th Dec 2016 22:08
Hey all,

I'm trying to build a retro like horror survival game in FPSC, in which the player is supposed to explore the map using a flashlight and to avoid enemies in the dark.
The problem is, that the enemy is always just black... or his ambience is equal to the level ambience.. let me try to explain what I have tried so far:

First I used the "LED White" of the nomadmod. It looked perfect and is exactly what I wanted.. till I met the enemy (brute from freaks and abominations, but it's the same problem for all other models too, like the sci fi or ww2 models).
The enemy is always just black, no matter how close I get to him.

Thus, I tried out a flashlight script (the one from this topic Seems to work fine (even if its more like night vision, than flashlight.) The problem here is, that the enemy has the same ambience like the map has. (It's 0 in general, but when the flashlight is switched on, it's 25, so no matter how far the enemy is away, even if he is in the dark, he has an ambience of 25 and is always visible. So I thought, I could maybe solve the problem, if I add fog to the game (fogstart=0,fogend=250). But the enemy is not influenced by fog and will still remain total black or same ambience as flashlight...

I spend so many hours trying to fix it. Just don't know how to solve it.
Maybe someone can help? :/

Kind regards, Stokie Mokie.
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 18th Dec 2016 14:24
StokieMokie.... and welcome
First, which version of fpsc are you using? (any mods) As some commands have changed from earlier versions.
Quote: "I used the "LED White" of the nomadmod"

These types of "flashlights" are weapons, they use the "muzzleflash" to produce a light.
It works great, if you are using the correct shader.fx, If not, the light will not show up/reflect on the entity.
Quote: "Thus, I tried out a flashlight script-the one from this topic"

These types of "flashlights" are simple a dynamic entity you pickup and then runs a script,
which in turn, shows a full screen HUD image across the screen (dark on the outside edges,transparent in the center)
and then turns up or down the ambience. This gives an excellent "Flashlight" like effect which looks good and is easy.

Your other problem has to do with which shader your using on your NPC character. Try this, I know it works.
Make a simple room (for testing) Place any ww2 characters (2 or 3) , some in the dark, couple under a light.
In the property settings change the "bumpbone.fx" shader to the "bump.fx shader. That's it. Test run and see.
Your characters now will be dark in no light, and the flashlight will reflect and show them.
My games never have bugs. They just develop random features..
Lots and lots of random features...
Years of Service
User Offline
Joined: 19th Oct 2016
Posted: 18th Dec 2016 16:26

Hello and thanks for Your fast reply!
Thank You for Your help! I changed the shader to bump.fx and everything is working fine now ^_^ can't believe it was so easy to solve D
Thx ^_^

Kind regards,
Stokie Mokie.

Login to post a reply

Server time is: 2020-08-15 04:19:17
Your offset time is: 2020-08-15 04:19:17