12-07-2011, 12:39 AM
12-07-2011, 12:51 AM
What it looks like from the original Amnesia scripting is that whatever the jar's name is ("jar") that the object inside of it will be the jar's name plus _item ("jar_item"). Try that out.
12-07-2011, 01:08 AM
thanks ill try it out
12-07-2011, 01:26 AM
Triadtimes is correct,
It's "NAME_ITEM"
-Grey Fox
It's "NAME_ITEM"
-Grey Fox
12-07-2011, 01:34 AM
it didnt work am i doin something wrong im sing the lithium bromide bottle from justine and have study key on break i also renamed the bottle to "bromide"
heres my script for it
{
AddUseItemCallback("", "bromide_key_study", "DOOR", "FUNCTION", true);
}
void FUNCTION(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("DOOR", false, true);
PlaySoundAtEntity("", "unlock_door", "DOOR", 0, false);
RemoveItem("bromide_key_study");
}
heres my script for it
{
AddUseItemCallback("", "bromide_key_study", "DOOR", "FUNCTION", true);
}
void FUNCTION(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("DOOR", false, true);
PlaySoundAtEntity("", "unlock_door", "DOOR", 0, false);
RemoveItem("bromide_key_study");
}
12-07-2011, 01:41 AM
(12-07-2011, 01:34 AM)hoppem Wrote: [ -> ]it didnt work am i doin something wrong im sing the lithium bromide bottle from justine and have study key on break i also renamed the bottle to "bromide"I think I know what's wrong, what did you call the item? By the looks of it "bromide". Sorry, but, when I said put "_item" it didn't mean put "_" then the item in the container I meant put "_item"
heres my script for it
{
AddUseItemCallback("", "bromide_key_study", "DOOR", "FUNCTION", true);
}
void FUNCTION(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("DOOR", false, true);
PlaySoundAtEntity("", "unlock_door", "DOOR", 0, false);
RemoveItem("bromide_key_study");
}
What I think it should look like (if the bottle's name stays "bromide") is:
Code:
OnStart(){
AddUseItemCallback("", "bromide_item", "DOOR", "FUNCTION", true);
}
void FUNCTION(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("DOOR", false, true);
PlaySoundAtEntity("", "unlock_door", "DOOR", 0, false);
RemoveItem("bromide_item");
}
Hope this works.
12-07-2011, 01:51 AM
IT WORKS yes very many thanks from hoppem!!!