Frictional Games Forum (read-only)

Full Version: Key doens´t work...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello,
Im new in doing Custom-Stories and could need some help, because i have a problem with my key:
in my leveleditor the key has under the right subject the name of the door.
in the hps:
void OnStart()
{
AddUseItemCallback("", "key_study_1", "mansion_1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, false);
PlaySoundAtEntity("", "unlock_key_study_1.snt", "mansion_1", 0, false);
RemoveItem("key_study_1");
AddDebugMessage("KeyOnDoor", false);
}
////////////////////////////
// Run when leaving map
void OnLeave()
{

}


but it doesn´t work and im very sorry, if it already exists a thread about it!

im happy about each comment Smile
I'm sorry, but what isn't working?
PlaySoundAtEntity("", "unlock_key_study_1.snt", "mansion_1", 0, false); should be :
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);


errh...it doens´t work, onv Sad
i have it of a tutorial on youtube, and by the player and some viewers it works...I have to write the name of the door in the box "CustomSubItemTypeName", right?

@flamez3
well, the key^^ It stays in the title
Yes it does say it in the title but it also says

"in my leveleditor the key has under the right subject the name of the door"


I have no idea what that means.
well, i thought, that this sentence will be strong to understand^^
i mean, when you klick on the key, and klick right to "entity" under "CustomSubItemTypeName" (that is the right box, to write the door´s name)
Why would you need to write the doors name in CustomSubItemTypeName?
errh....because so it stays ?
a guy on youtube has done this and by him it works xD
CustomSubItemTypeName can be whatever you want so long as it is reflected in the .lang file.
(02-14-2012, 04:50 PM)thephoenix1860 Wrote: [ -> ]errh....because so it stays ?
a guy on youtube has done this and by him it works xD
Are you trying to name the key?


Pages: 1 2