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
Problem with lights?
Storfigge Offline
Member

Posts: 101
Threads: 31
Joined: Sep 2012
Reputation: 0
#1
Problem with lights?

Why won't this work?

void OnStart()
{
AddEntityCollideCallback("Player", "light", "LitLight", true, 1);
}

void LitLight(string &in asParent, string &in asChild, int alState)
{
SetLightVisible("altar_lamp_1", true);
SetLightVisible("altar_lamp_2", true);
SetLightVisible("altar_lamp_3", true);
SetLightVisible("altar_lamp_4", true);
}

void OnEnter()
{

}


void OnLeave()
{

}


I want the altar lamps to become lit.

02-03-2013, 08:44 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Problem with lights?

Lights are not lamps (assuming you're trying to turn on a lamp entity).

Tutorials: From Noob to Pro
02-03-2013, 08:48 PM
Website Find
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#3
RE: Problem with lights?

Try adding a debug message in your LitLight function. If you see the message, that means you probably have wrote the names wrong for the lights.

In Ruins [WIP]
02-03-2013, 08:50 PM
Find
Storfigge Offline
Member

Posts: 101
Threads: 31
Joined: Sep 2012
Reputation: 0
#4
RE: Problem with lights?

(02-03-2013, 08:48 PM)Your Computer Wrote: Lights are not lamps (assuming you're trying to turn on a lamp entity).

Yea that's what I'm trying to do Tongue how do I do so the lamps become lit?

02-03-2013, 08:55 PM
Find
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#5
RE: Problem with lights?

(02-03-2013, 08:55 PM)Storfigge Wrote:
(02-03-2013, 08:48 PM)Your Computer Wrote: Lights are not lamps (assuming you're trying to turn on a lamp entity).

Yea that's what I'm trying to do Tongue how do I do so the lamps become lit?

void SetLampLit(string& asName, bool abLit, bool abEffects);

In Ruins [WIP]
02-03-2013, 09:00 PM
Find
Storfigge Offline
Member

Posts: 101
Threads: 31
Joined: Sep 2012
Reputation: 0
#6
RE: Problem with lights?

(02-03-2013, 09:00 PM)NaxEla Wrote:
(02-03-2013, 08:55 PM)Storfigge Wrote:
(02-03-2013, 08:48 PM)Your Computer Wrote: Lights are not lamps (assuming you're trying to turn on a lamp entity).

Yea that's what I'm trying to do Tongue how do I do so the lamps become lit?

void SetLampLit(string& asName, bool abLit, bool abEffects);

Thanks for the quick answer Smile

02-03-2013, 09:05 PM
Find
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#7
RE: Problem with lights?

No problem Smile Don't forget about the wiki page: http://wiki.frictionalgames.com/hpl2/amn..._functions

It has every function on there and it's all nice and organized Smile

In Ruins [WIP]
02-03-2013, 09:31 PM
Find




Users browsing this thread: 2 Guest(s)