Frictional Games Forum (read-only)
Need help on the inventory texts and door texts! - 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 - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Need help on the inventory texts and door texts! (/thread-16523.html)

Pages: 1 2


RE: Need help on the inventory texts and door texts! - TerrorsEnd - 06-27-2012

(06-27-2012, 12:59 AM)Obliviator27 Wrote: You'll have to specify what doesn't work.
As far as your script goes, you're telling the door to lock. Use false instead of true.
The door unlocking doesn't work

void OnEnter()
{

AddUseItemCallback("OpenDoor", "cellarkey", "level_cellar_1", "UnlockLevelDoor", true);

}

void UnlockLevelDoor(string &in Item, string &in Entity)
{
SetLevelDoorLocked("level_cellar_1", false);
PlaySoundAtEntity("", "unlock_door", "level_cellar_1", 1, false);
RemoveItem("cellarkey");
RemoveItem("trollkey");
}

What's the problem? I tried to google it, youtube it etc. Can't find the solution..


RE: Need help on the inventory texts and door texts! - Obliviator27 - 06-27-2012

Make sure that the key is named cellarkey under the general tab.


RE: Need help on the inventory texts and door texts! - TerrorsEnd - 06-27-2012

(06-27-2012, 01:17 AM)Obliviator27 Wrote: Make sure that the key is named cellarkey under the general tab.
Yeah it is named cellarkey


RE: Need help on the inventory texts and door texts! - Obliviator27 - 06-27-2012

Oh. I didn't see this before.
Change it from OnEnter to OnStart.

OnStart is called when the map is first loaded.
OnEnter is called every other time.


RE: Need help on the inventory texts and door texts! - TerrorsEnd - 06-27-2012

(06-27-2012, 01:19 AM)Obliviator27 Wrote: Oh. I didn't see this before.
Change it from OnEnter to OnStart.

OnStart is called when the map is first loaded.
OnEnter is called every other time.
Still doesn't work o.O


RE: Need help on the inventory texts and door texts! - TerrorsEnd - 06-27-2012

FIXED!