Frictional Games Forum (read-only)
Lantern power change - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Lantern power change (/thread-8227.html)

Pages: 1 2 3 4


RE: Lantern power change - MrBigzy - 05-27-2011

Now that I think about it, you must be able to do things like that, or script functions like BreakJoint wouldn't work.


RE: Lantern power change - skypeskype - 05-27-2011

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"


RE: Lantern power change - DannieWest - 05-29-2011

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


RE: Lantern power change - Apjjm - 05-29-2011

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



RE: Lantern power change - DannieWest - 05-29-2011

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?