Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Candle fade
proshitness Offline
Junior Member

Posts: 20
Threads: 3
Joined: Nov 2011
Reputation: 0
#1
Candle fade

How do i make the candles that hang on the wall fade when the player walks by them?
thanks alot
11-08-2011, 06:23 PM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#2
RE: Candle fade

Can you elaborate on this please?
11-08-2011, 06:53 PM
Find
proshitness Offline
Junior Member

Posts: 20
Threads: 3
Joined: Nov 2011
Reputation: 0
#3
RE: Candle fade

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
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#4
RE: Candle fade

(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
Find
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#5
RE: Candle fade

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

11-08-2011, 07:43 PM
Find
proshitness Offline
Junior Member

Posts: 20
Threads: 3
Joined: Nov 2011
Reputation: 0
#6
RE: Candle fade

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?
11-08-2011, 07:48 PM
Find
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#7
RE: Candle fade

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.

11-08-2011, 07:51 PM
Find
proshitness Offline
Junior Member

Posts: 20
Threads: 3
Joined: Nov 2011
Reputation: 0
#8
RE: Candle fade

ok thanks
it didn't work...
(This post was last modified: 11-08-2011, 08:44 PM by proshitness.)
11-08-2011, 07:59 PM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#9
RE: Candle fade

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

11-09-2011, 12:31 AM
Find
proshitness Offline
Junior Member

Posts: 20
Threads: 3
Joined: Nov 2011
Reputation: 0
#10
RE: Candle fade

the other question never mind but the script didn't work... can you help me?
11-09-2011, 08:06 AM
Find




Users browsing this thread: 1 Guest(s)