(01-01-2012, 12:29 AM)Your Computer Wrote: Strings do not have the method "isActive" (assuming candlestick_wall_1 is a variable of type string). I don't think there's a way to properly determine whether or not a light or entity is active, but such an event should be able to do without having to check.
what?
Since you have multiple point lights you want to light up when a single candle entity is lit. I would find the candle entity in level editor, place a name for the
callback under
PlayerInteractCallback and check
PlayerInteractCallbackAutoRemove. That makes it so when you use a tinderbox on the candle, it counts as an interaction, calls the
callback and lights the candle.
Lets say the
PlayerInteractCallback was named as
lit_candle_1 and the point lights you want to light up are black and named as
point_light_1,
point_light_2 and
point_light_3.
Then you go to your .hps file and write something like this (not inside any
void thingies brackets):
void lit_candle_1(string &in asEntity)
{
for(int i=0;i<4;i++)
FadeLightTo("
point_light_"+i, redvalue, greenvalue, bluevalue, alphavalue, -1,
0.5f);
}
in case you want different values for your point light (or dont know how that for(int i=0... thing works) use separate
FadeLightTo's
And please don't use
SetLightVisible it looks ugly when lights around appear faster than the entitys own point light.
Would you like the point lights to flicker like the candles own one (its cool)? That would make things just a little bit more complicated.