Frictional Games Forum (read-only)
Can't find my Custom Story - 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: Can't find my Custom Story (/thread-10574.html)

Pages: 1 2 3


RE: Can't find my Custom Story - i3670 - 10-03-2011

Okay, the first key (bedroom) works. Now when I try to make the other key work it says "Unexpected token '{'

{
AddUseItemCallback("", "Thronedoorkey", "Thronedoor", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Thronedoor", false, true);
PlaySoundAtEntity("", "unlock_door", "Thronedoor", 0, false);
RemoveItem("Thronedoorkey");
}



RE: Can't find my Custom Story - Your Computer - 10-03-2011

If you use the function i gave you, you could use the same function for multiple key-door combinations.


RE: Can't find my Custom Story - i3670 - 10-03-2011

(10-03-2011, 06:05 PM)Your Computer Wrote: If you use the function i gave you, you could use the same function for multiple key-door combinations.
Guide me please. What shall I remove?

{
AddUseItemCallback("", "Bedroomkey", "Bedroom", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Bedroom", false, true);
PlaySoundAtEntity("", "unlock_door", "Bedroom", 0, false);
RemoveItem("Bedroomkey");
}

{
AddUseItemCallback("", "Thronedoorkey", "Thronedoor", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Thronedoor", false, true);
PlaySoundAtEntity("", "unlock_door", "Thronedoor", 0, false);
RemoveItem("Thronedoorkey");
}



RE: Can't find my Custom Story - Your Computer - 10-03-2011

(10-03-2011, 06:09 PM)i3670 Wrote: Guide me please. What shall I remove?

Your code should look something like this:
Code:
void OnStart()
{
AddUseItemCallback("", "Bedroomkey", "Bedroom", "UsedKeyOnDoor", true);
AddUseItemCallback("", "Thronedoorkey", "Thronedoor", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door", asEntity, 0, false);
RemoveItem(asItem);
}



RE: Can't find my Custom Story - i3670 - 10-03-2011

Ok, thanks got most of it working now, got some more things to do like notes. don't think those will be a problem though.