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
Solved - Please remove
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#6
RE: Changing a lamp entity's radius

(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.

01-01-2012, 01:17 AM
Find


Messages In This Thread
Solved - Please remove - by eagledude4 - 12-31-2011, 10:56 PM
RE: Changing a lamp entity's radius - by Statyk - 12-31-2011, 11:02 PM
RE: Changing a lamp entity's radius - by Khyrpa - 01-01-2012, 01:17 AM
RE: Changing a lamp entity's radius - by flamez3 - 01-01-2012, 02:03 AM
RE: Changing a lamp entity's radius - by Khyrpa - 01-01-2012, 02:20 AM
RE: Changing a lamp entity's radius - by Khyrpa - 01-01-2012, 03:47 AM



Users browsing this thread: 1 Guest(s)