Frictional Games Forum (read-only)
entity items - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: entity items (/thread-16409.html)

Pages: 1 2 3


entity items - lothabread - 06-22-2012

Hello, i was wondering if anyone could help me with something. i'm trying to use a key that i get when breaking a small box to open a door but don't know how to do that. I've looked around google and youtube but found nothing. if someone could help that would be great. Big Grin


RE: entity items - MaZiCUT - 06-22-2012

1. Choose a box that you can breake, a breakable box.

2. Put the key inside

3. ???

4. Profit

If there is no key that you can breake just choose a vase or something, there's always options in entity i believe like "contains item" and then you choose an item, or write the name of that item.


RE: entity items - Cruzore - 06-22-2012

So, I am assuming you got no scripting experience at all. There is indeed a wiki, and I'll point the important sites on it out:
http://wiki.frictionalgames.com/hpl2/amnesia/script_functions
the most important one, it contains all functions of hpl2. Since there are many, press ctrl + f to search for a keyword.
On the left side, you can browse through the categories. Make sure you only look in hlp2. There are scripting tutorials and other ones, so look through everything.
The second most important one is the main game itself. You can just freely look at the main game's maps and scripts, and see how it works. This way, you learn to make good level design, cleverly placed lights and efficient scripts.
Also, this forum has tutorials as well. You can just search for them.
Now for your problem, you should use AddUseItemCallback and SetSwingDoorLocked to lock/unlock the door. if it's a level door, use SetlevelDoorLocked instead. Look those names up on the engine scripts page and try your luck in building your script by looking at tutorials and how FG made their maps and scripts. If it doesn't work and gives you an error, and you can't fix it yourself by looking at that error, just ask again and people will help you out. Just make sure not to "command" others to post you a whole script file, try to make it yourself at least. You learn by your mistakes.

If you instead meant how to get an item into a breakable entity, just do as CrazyArts said.


RE: entity items - lothabread - 06-22-2012

actually what ive done is get a container and put a key inside inside it and i would like to know how to use what comes out of it after breaking it, like when breaking the small jar behind the painting in the guess room in the dark descent [Image: photo.php?fbid=379996532059568&set=a.169...=1&theater]


RE: entity items - Cruzore - 06-22-2012

I still don't get what you want. Do you want to know how to get the key to open the door,or how to get the key inside a bottle?

By the way, I can't see your picture, but a quick description of what exactly you want is enough.


RE: entity items - lothabread - 06-23-2012

i want to do something like in dark descent where you get the key from the bottle to open the door to the machine room but in my case i want to get a key from a wooden box to open a swing door. i hope that makes sense Confused


RE: entity items - Cruzore - 06-23-2012

I don't know what your problem is. That you don't know how to get the key in the box, or how to get the key to open the door?


RE: entity items - lothabread - 06-23-2012

getting the key to open the door as well as changing the name, sorry if i'm making this more complicated than it should be


RE: entity items - SilentStriker - 06-23-2012

Guys the easiest way of making a key inside a breakable box or vase is by clicking the box in the level editor then go to the entity tab on the left then ContainedItem I have never used it myself so I don't know how to rename the key etc but it may be the same way as a normal key


RE: entity items - lothabread - 06-23-2012

(06-23-2012, 12:33 AM)SilentStriker Wrote: Guys the easiest way of making a key inside a breakable box or vase is by clicking the box in the level editor then go to the entity tab on the left then ContainedItem I have never used it myself so I don't know how to rename the key etc but it may be the same way as a normal key
that's what i'm trying to do actually rename it so i can use it with a swing door