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
Key in jar
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#1
Key in jar

I just plain can't figure out how it works! I checked the map and script for Daniel's Room, and found the only hint to be that the "contained item" for the object was "key_study." Nothing in the HPS about the key_jar or anywhere else really. Yet when I set the key_jar to have this contained item, nothing appears when I break it. How can I get a key to appear, and have a custom description.0

09-26-2012, 08:56 AM
Find
jamesclarke555 Offline
Junior Member

Posts: 34
Threads: 2
Joined: Jan 2012
Reputation: 0
#2
RE: Key in jar

The key should appear if you have "key_study" set as the contained item.

The problem I had was; I found that the key is hard coded to look for:

<Entry Name="ItemName_KeyStudy">
<Entry Name="ItemDesc_KeyStudy">


If I remember correctly, the description is always picked up from the main Amnesia english.lang file, so you would need to create a total conversion as custom stories will always display "Machine Room Key" when the key is picked up!

- Parasomnia -
[Image: SxShD]
09-26-2012, 09:28 AM
Find
Vic7im Offline
Junior Member

Posts: 44
Threads: 9
Joined: Sep 2012
Reputation: 3
#3
RE: Key in jar

A cheap trick that might work:

You create the jar, make it Static and without a contained item.
You create the key_custom and place it in the same spot the contained key is, make it inactive.
Create a callback when interacting with the Jar so that it breaks (prophealth = -1) and sets your key_custom active.

This should work, imho.
09-27-2012, 09:13 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#4
RE: Key in jar

(09-27-2012, 09:13 AM)Vic7im Wrote: A cheap trick that might work:

You create the jar, make it Static and without a contained item.
You create the key_custom and place it in the same spot the contained key is, make it inactive.
Create a callback when interacting with the Jar so that it breaks (prophealth = -1) and sets your key_custom active.

This should work, imho.
But it wouldn't make sense that the bottle just broke...

Trying is the first step to success.
09-27-2012, 11:11 AM
Find
Vic7im Offline
Junior Member

Posts: 44
Threads: 9
Joined: Sep 2012
Reputation: 3
#5
RE: Key in jar

(09-27-2012, 11:11 AM)beecake Wrote:
(09-27-2012, 09:13 AM)Vic7im Wrote: A cheap trick that might work:

You create the jar, make it Static and without a contained item.
You create the key_custom and place it in the same spot the contained key is, make it inactive.
Create a callback when interacting with the Jar so that it breaks (prophealth = -1) and sets your key_custom active.

This should work, imho.
But it wouldn't make sense that the bottle just broke...
Try this:

Spoiler below!


void OnStart()
{
SetEntityPlayerInteractCallback("Jar", "CreateKey", true);

}




void CreateKey (string &in asEntity)
{
SetPropHealth("Jar", -1);
AddPropImpulse("Jar", 0, 0, 1, "world");
SetEntityActive("Key", true);
}


Result here: http://www31.zippyshare.com/v/62757806/file.html
09-27-2012, 02:19 PM
Find




Users browsing this thread: 1 Guest(s)