Frictional Games Forum (read-only)

Full Version: Declaring an entity
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys,

I am connecting a point light to a candlestick, so when the candlestick is lit by the player, the point light activates.

[Image: Untitled.png]

In my mapname.hps file, I have the following function.

Code:
void LightCandle1(string &in asEntity)
{
    SetLightVisible(PointLight_1, true);
}

When I try to load the map, I get this error;

[Image: Untitled2.png]

How do I fix this error?

Thanks,

JPiiONEFOURONE
(09-05-2012, 10:21 AM)JPiiONEFOURONE Wrote: [ -> ]How do I fix this error?

By converting the undeclared variable into a string.
You could always set the pointlight to 0, 0, 0, 0 and put it into the ConnectedLight field. This way, when the candle is lit, the pointlight will take on the color of the candle.
by declaring pointlight1 so make it this:
SetLightVisible("PointLight_1", true);
You could also write the name of the point light in "COnnected Light", it works, trust me
As Steve said. To "Declare" is what i just did with the word: Declare. You put it between these " " 2 fellows.
"Declaring an entity."
No thanks, I'm an atheist.