Frictional Games Forum (read-only)

Full Version: Candle fade
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
How do i make the candles that hang on the wall fade when the player walks by them?
thanks alot
Can you elaborate on this please?
I want to do it so when the player walks in the corridor the lamps \ torchs \ candles turn off, what more can i elaborate...?
(11-08-2011, 06:57 PM)proshitness Wrote: [ -> ]I want to do it so when the player walks in the corridor the lamps \ torchs \ candles turn off, what more can i elaborate...?
you can either set a fog in the corridor or you can place a script area in the corridor and run a script in the .hps so that when the player walks into that area, the lamps shut off (or dim. just change values in the script).

possible script:
//_____________________
void OnStart()
{
AddEntityCollideCallback("Player", "SCRIPT_AREA_NAME", "LampsOff_func", true, 1); //this is the area collide
}

void LampsOff_func(string &in asParent, string &in asChild, int alState)
{
SetLampLit("LAMPNAME_1", false);
SetLampLit("LAMPNAME_2", false);
SetLampLit("LAMPNAME_3", false);
//And so-on with each lamp you want to shut off.
}

//__________________________________

Each phrase/word in there that is capitalized, just change to the names of its correspondence.
(11-08-2011, 07:05 PM)Statyk Wrote: [ -> ]{
SetLampLit("LAMPNAME_1", false);
SetLampLit("LAMPNAME_2", false);
SetLampLit("LAMPNAME_3", false);
//And so-on with each lamp you want to shut off.
}
The SetLampLit function has one more bool after. I'm not sure if it works without setting it to true or false.
SetLampLit(string& asName, bool abLit, bool abEffects);

the bool abEffects adds a sound/particle effect or something when the lamp is lit/unlit, so setting it true might be good.

SetLampLit("LAMPNAME", false, true);
OK thanks , another question, when you do level doors, do you do the entire map on one file or do you make a bunch of them?
Thats makes almost no sense Smile

Level door functions as a door between different map files. So if you want to teleport a player to a different part inside the same map file, just use some teleport script.
ok thanks
it didn't work...
(11-08-2011, 07:48 PM)proshitness Wrote: [ -> ]OK thanks , another question, when you do level doors, do you do the entire map on one file or do you make a bunch of them?
Again.... could you elaborate? I don't understand what you're asking...

the other question never mind but the script didn't work... can you help me?
Pages: 1 2