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
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#11
RE: Candle fade

Post your script.

Tutorials: From Noob to Pro
11-09-2011, 01:51 PM
Website Find
proshitness Offline
Junior Member

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


void OnStart()
{
AddEntityCollideCallback("Player", "Lights_Out", "LampsOff_func", true, 1);
}

void OnEnter()
{
}

void OnLeave()
{
}

void LampsOff_func(string &in asParent, string &in asChild, int alState)
{
SetLampLit("torch_static01_1", false, true);
SetLampLit("torch_static01_2", false, true);
SetLampLit("torch_static01_3", false, true);
SetLampLit("torch_static01_4", false, true);
SetLampLit("torch_static01_5", false, true);
SetLampLit("torch_static01_6", false, true);
}

void SetLampLit(string& asName, bool abLit, bool abEffects);
11-09-2011, 02:00 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#13
RE: Candle fade

Try this:

PHP Code: (Select All)
void OnStart()
{
    
AddEntityCollideCallback("Player""Lights_Out""LampsOff_func"true1);
}

void OnEnter()
{
}

void OnLeave()
{
}

void LampsOff_func(string &in asParentstring &in asChildint alState)
{
    if (
asChild == "Lights_Out")
    {
        
SetLampLit("torch_static01_1"falsetrue);
        
SetLampLit("torch_static01_2"falsetrue);
        
SetLampLit("torch_static01_3"falsetrue);
        
SetLampLit("torch_static01_4"falsetrue);
        
SetLampLit("torch_static01_5"falsetrue);
        
SetLampLit("torch_static01_6"falsetrue);
    }


Tutorials: From Noob to Pro
11-09-2011, 02:26 PM
Website Find
proshitness Offline
Junior Member

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

didn't work...=\

maybe i need to use something else then the torch_static01
11-09-2011, 02:49 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#15
RE: Candle fade

Do you have a script area in your map named "Lights_Out"? Do you have 6 torch_static01 entities in your map?

Tutorials: From Noob to Pro
11-09-2011, 03:47 PM
Website Find
proshitness Offline
Junior Member

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

Yes and yes
do the torches need to be inside the area script?
(This post was last modified: 11-09-2011, 06:28 PM by proshitness.)
11-09-2011, 03:47 PM
Find
Statyk Offline
Schrödinger's Mod

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

(11-09-2011, 03:47 PM)proshitness Wrote: Yes and yes
do the torches need to be inside the area script?
No they do not. They can be anywhere. the area is just there to trigger the script when the player walks into it. Try using a different torch and see if it does anything. Also, try to make sure the area is a "SCRIPT" area, not a insanity area, spawn area, etc. could be a simple little mistake. the script is fine. something is wrong in the level itself is my best guess.

11-09-2011, 09:58 PM
Find
proshitness Offline
Junior Member

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

ok i changed the torches and still didn't work, i check and the area is a script what can i do? =\
11-09-2011, 10:06 PM
Find
Statyk Offline
Schrödinger's Mod

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

I'll try to mimic this exact scenario to see if it works. If it does, something may be wrong between your .hps and map. do their names match exactly?

example:


NOT:
- TorchMap.map
- Torchmap.hps

IS SHOULD BE:
- TorchMap.map
- TorchMap.hps

Simple things make a BIG difference. One of my scripts failed because I typed it "PlaySoundatEntity..." the "a" was not capitalized.

Just did it and it worked perfectly... Make sure your names of areas and torches match EXACTLY. I caught myself titling the area: "LightsOut" when in the script, it asks for "Lights_Out" again... Make sure EVERY LETTER matches EXACTLY.

My only guess of this situation is that you didn't title something right.
(This post was last modified: 11-09-2011, 10:22 PM by Statyk.)
11-09-2011, 10:12 PM
Find
proshitness Offline
Junior Member

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

oh **** XDDDDD I WROTE MAIN_AREA.HSP and no HPS xDDDD Thanks alot!!!!
just if you can help with this?

http://www.frictionalgames.com/forum/thr...#pid101272


and i want to know how to make a sound of wind with that.
11-09-2011, 10:23 PM
Find




Users browsing this thread: 1 Guest(s)