Frictional Games Forum (read-only)

Full Version: Lantern Question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've got a strange question for you guys. Is there a way to enable the lantern somehow?
The reason i ask this is because i wanted to replay a certain level and if i load the map via the debug menu (yeh should probably not have done that) my lantern is not in my "inventory" meaning that the game thinks i haven't picked up the lantern yet.

Hope you guys can help me.

-RaideX
Theres 2 ways, one will certainly work and one might.

1. Do it like TCR did it, that is placing a lantern in every map manually(or if you play from the loaded map to the end its really just in the first one since having the lantern will be put in the save)

2. Attemp using the TDD function that adds a certain item to the players inventory and place it in OnStart() of every map, should give you one when getting into the level.

This might work if TCR did not get completely rid of the inventory but simply hid it by removing the UI and ability to acces it, which is not entirely impossible considering it would be pretty easy for them to get things working like that.
They might also have completely removed it in which case you should just get errors.
The problem is that i'm not using any leveleditor to play the levels. I am just using the debug console to skip the levels and select the map that i want to play. I can't do this with the normal load map option because my save's got wiped away for some reason. I guess after updating/testing the 1.02 patch steam had some problems with that, i don't know.

But i did see that for some levels TCR had a few laterns placed either for players that missed the first few lanters or for them to pick up. But if you go to the reactor level via the debug menu you end up having no lantern at all.
Add a line of code in the map's .hps file that gives you a lantern at the start of the map.

Code:
void OnStart()
{
   GiveItemFromFile("lantern", "lantern.ent");
...
(10-03-2013, 05:31 PM)Oscar House Wrote: [ -> ]Add a line of code in the map's .hps file that gives you a lantern at the start of the map.

Code:
void OnStart()
{
   GiveItemFromFile("lantern", "lantern.ent");
...

thanks for that :3

EDIT: Well it seems like theres already code for the lanter in the .hps file(s)
Code:
if(ScriptDebugOn())
        {
            //SetFogProperties(0, 75, 1, false);
            GiveItemFromFile("lantern", "lantern.ent");
for the stuff that i understand of coding it seems like it should already give me the lantern if debug mode is on. Weird.
(10-03-2013, 07:06 PM)RaideX Wrote: [ -> ]for the stuff that i understand of coding it seems like it should already give me the lantern if debug mode is on. Weird.

ScriptDebugOn() returns true if your profile's user_settings.cfg has ScriptDebugOn="true". Enabling the debug menu alone won't make ScriptDebugOn() return true.
(10-03-2013, 07:41 PM)Your Computer Wrote: [ -> ]
(10-03-2013, 07:06 PM)RaideX Wrote: [ -> ]for the stuff that i understand of coding it seems like it should already give me the lantern if debug mode is on. Weird.

ScriptDebugOn() returns true if your profile's user_settings.cfg has ScriptDebugOn="true". Enabling the debug menu alone won't make ScriptDebugOn() return true.

Tried it and worked just as it should, still some issues though, not related to the lantern it self but more loading directly since you often dont start maps at the correct startpose and have to manually teleport using the debug menu, which can become problematic in later levels that start in elevators.
I think there is a checkbox about the starting position somewhere on the debug menu.
(10-03-2013, 04:07 PM)The Mug Wrote: [ -> ]1. Do it like TCR did it, that is placing a lantern in every map manually(or if you play from the loaded map to the end its really just in the first one since having the lantern will be put in the save)
There is a lantern in every level...?
There are some at the first few levels. But those are just for the players that missed the first one... or the second or third one.

The last lantern i found was when you enter the secret path from the bath, then there's one on one of the crates.