If you want a "click on object/door" use the:
void OnEnter()
{
SetEntityPlayerInteractCallback("Name of your door", "LockedDoor", false);
}
void LockedDoor(string &in entity)
{
SetMessage("TestStory", "ItemDesc_mansion_1", 0);
}
Yes you can place the "Void lockedDoor(string &in entity)" anywhere in the script, however - if you like some sort of order try to categorize your scripts. Either as a timeline, or by putting all item interactions at one place and other stuff at some place.. hope you get what I mean.
You can add comments by doing a:
// Locked door <------- my comment
Anything behind a "//" won't be recognized as a function or a script.
And, all script functions can be found here:
http://wiki.frictionalgames.com/hpl2/amn..._functions
They seem to have updated the page with information, making it easier to understand the scripts.