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
Declaring an entity
JPiiONEFOURONE Offline
Junior Member

Posts: 13
Threads: 4
Joined: Sep 2012
Reputation: 0
#1
Declaring an entity

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.

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

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Declaring an entity

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

By converting the undeclared variable into a string.

Tutorials: From Noob to Pro
(This post was last modified: 09-05-2012, 02:52 PM by Your Computer.)
09-05-2012, 10:40 AM
Website Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#3
RE: Declaring an entity

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.

09-05-2012, 11:47 AM
Find
Steve Offline
Member

Posts: 178
Threads: 17
Joined: Jun 2012
Reputation: 7
#4
RE: Declaring an entity

by declaring pointlight1 so make it this:
SetLightVisible("PointLight_1", true);

CURRENTLY WORKING ON:
Final Light = 40%
Need of voice actors.
09-05-2012, 02:47 PM
Find
GoranGaming Offline
Member

Posts: 183
Threads: 30
Joined: Feb 2012
Reputation: 7
#5
RE: Declaring an entity

You could also write the name of the point light in "COnnected Light", it works, trust me

Current projects:

The Dark Prison 85 % (Stopped working on this one)

Unnamed Project 7 %
09-05-2012, 09:06 PM
Website Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#6
RE: Declaring an entity

As Steve said. To "Declare" is what i just did with the word: Declare. You put it between these " " 2 fellows.

Trying is the first step to success.
09-05-2012, 09:19 PM
Find
failedALIAS Offline
Posting Freak

Posts: 2,782
Threads: 16
Joined: Jun 2012
Reputation: 97
#7
RE: Declaring an entity

"Declaring an entity."
No thanks, I'm an atheist.
09-05-2012, 09:27 PM
Find




Users browsing this thread: 3 Guest(s)