Frictional Games Forum (read-only)

Full Version: Help About Key
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello evrybody this is my first post on this forum xD
I creating my first custom story
I created about 3 maps and i wanna make it not so big not so small about
4-5 doors and i make it
i set the first doors are opened by the key and it worked
But what is problem ?
When i set script and lang file it is all set good (i think)
I pick up key it says what i want description is also what i want
but when i come to door what need to unlock i double click in invetory key on doors and Nothing no text This item can not use this way
Door's are still closed
I try again then white text comes "This item can not use this way"
What is problem il set here my script and lang if need just to solve it

Sorry for my bad English Sad
It's good to post your script so we can see what the problem could be.
Please post the script here. Maybe encased in php or code.

EDIT: Btw, this was also posted in the wrong section. This should be at the Development Support.
Sorry i sad my first post i don't really know where to put it xD

Here you go my code .hps file same name as .map

void OnStart()

{

AddUseItemCallback("", "Key123", "Door123", "UseKeyOnDoor", true);
AddUseItemCallback("", "Study123", "Doors122", "UseKeyOnDoor", true);
}

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

void UseKeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Doors122", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "Doors122", 0, false);
RemoveItem("Study123");
}
Code:
AddUseItemCallback("", "Study123", "Doors122", "UseKeyOnDoor", true);

Should be "UseKeyOnDoor2" Smile
Thanks now working perfect Wink
Now Romulator 2 more question xD or to make new thread can tell me how to make Wake up (my first map is forest) how to make like shaking (like original Amnesia) but not going through rooms jsut shaking then comes up and play and second
Do you have or can you make some good forest for me xD i really need it :/
Well I can't just MAKE you a script because you need to learn how to do that, and I do not know what you need Smile But this may help you;
http://wiki.frictionalgames.com/hpl2/tut...equences?s

And I won't make you a forest map either, but abuse the hell out of the trees in the game, make some large and fat, while others skinny and small, and a mixture of them both. Smile