Frictional Games Forum (read-only)

Full Version: Lantern power change
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
Now that I think about it, you must be able to do things like that, or script functions like BreakJoint wouldn't work.
Hmm... Can't you change the light radius from the game.cfg in the "config" folder ?? I found this in there : <Player_Lantern

Color="0.88 0.82 0.40 0.8"
Radius = "0.0001"
Gobo = ""
LocalOffset = "0.3 -0.3 -0.1"
TurnOnSound = "ui_lantern_on"
TurnOffSound = "ui_lantern_off"
OutOfOilSound = "ui_lantern_off"
DisabledSound = ""
CastShadows = "false"
LowerOilSpeed = "0.23"
FadeLightOilAmount = "10"
(05-27-2011, 01:53 PM)Apjjm Wrote: [ -> ]I was thinking of something along the lines of this:
Code:
void SetEntityLightVisible(string entity, string light, bool visible)
    {SetLightVisible(entity+"_"+light,visible);}

So basicly, I would be able to script so that when I pick up the lantern, I remove the old one (so there won't be 2 in the inventory) and then just increase the "light power" on the lantern? :o


And sorry bout this lil nooby question, but how do I remove the message from a door when I've used the key on it? >.<
(05-29-2011, 06:08 PM)DannieWest Wrote: [ -> ]
(05-27-2011, 01:53 PM)Apjjm Wrote: [ -> ]I was thinking of something along the lines of this:
Code:
void SetEntityLightVisible(string entity, string light, bool visible)
    {SetLightVisible(entity+"_"+light,visible);}

So basicly, I would be able to script so that when I pick up the lantern, I remove the old one (so there won't be 2 in the inventory) and then just increase the "light power" on the lantern? :o


And sorry bout this lil nooby question, but how do I remove the message from a door when I've used the key on it? >.<
Well, it would work if you can access the lantern in that way - i tested it a little and couldn't get it to work but you might have better luck.
Removing the message can be done simply by running an if-statement check to see if the door is locked before showing the message? You may or may not need to add a variable to track the state of the door depending on your situation.
Oh, aw alright :o Nah, no chance, I'm just a beginner scripter lols Smile

Not very familiar with the "if", I know that it makes like, if the door state is 0 as locked, when you use a key on it it gets 1 when unlocked, but I'm not sure how to fit it in the script, nor how the function works :o Is thre a tutorial for this somewhere?
Pages: 1 2 3 4