Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bottle/Breakable item key
hoppem Offline
Junior Member

Posts: 44
Threads: 13
Joined: Nov 2011
Reputation: 1
#1
Bottle/Breakable item key

As you may know there are items where on break another item pops out of it but for a key would it's name be the item it came out of?
12-07-2011, 12:39 AM
Find
triadtimes Offline
Senior Member

Posts: 508
Threads: 16
Joined: Jan 2011
Reputation: 21
#2
RE: Bottle/Breakable item key

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, 12:51 AM
Find
hoppem Offline
Junior Member

Posts: 44
Threads: 13
Joined: Nov 2011
Reputation: 1
#3
RE: Bottle/Breakable item key

thanks ill try it out
12-07-2011, 01:08 AM
Find
GreyFox Offline
Member

Posts: 162
Threads: 23
Joined: Jul 2011
Reputation: 2
#4
RE: Bottle/Breakable item key

Triadtimes is correct,

It's "NAME_ITEM"

-Grey Fox

Current Project
Forgotten
12-07-2011, 01:26 AM
Find
hoppem Offline
Junior Member

Posts: 44
Threads: 13
Joined: Nov 2011
Reputation: 1
#5
RE: Bottle/Breakable item key

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");
}




12-07-2011, 01:34 AM
Find
triadtimes Offline
Senior Member

Posts: 508
Threads: 16
Joined: Jan 2011
Reputation: 21
#6
RE: Bottle/Breakable item key

(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"
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");
}
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"

What I think it should look like (if the bottle's name stays "bromide") is:
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:41 AM
Find
hoppem Offline
Junior Member

Posts: 44
Threads: 13
Joined: Nov 2011
Reputation: 1
#7
RE: Bottle/Breakable item key

IT WORKS yes very many thanks from hoppem!!!
12-07-2011, 01:51 AM
Find




Users browsing this thread: 1 Guest(s)