Frictional Games Forum (read-only)
Candle fade - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Candle fade (/thread-11247.html)

Pages: 1 2


Candle fade - proshitness - 11-08-2011

How do i make the candles that hang on the wall fade when the player walks by them?
thanks alot


RE: Candle fade - Statyk - 11-08-2011

Can you elaborate on this please?



RE: Candle fade - proshitness - 11-08-2011

I want to do it so when the player walks in the corridor the lamps \ torchs \ candles turn off, what more can i elaborate...?


RE: Candle fade - Statyk - 11-08-2011

(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.



RE: Candle fade - Khyrpa - 11-08-2011

(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);



RE: Candle fade - proshitness - 11-08-2011

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?


RE: Candle fade - Khyrpa - 11-08-2011

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.



RE: Candle fade - proshitness - 11-08-2011

ok thanks
it didn't work...


RE: Candle fade - Statyk - 11-09-2011

(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...




RE: Candle fade - proshitness - 11-09-2011

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