[LVL ED] New Question: How to create a door - 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: [LVL ED] New Question: How to create a door (/thread-16326.html) |
New Question: How to create a door - Nervly - 06-20-2012 Hello again Cruzore/FastHunteR or new helper Well, my new question is, how do I create a door? Like, I want to make a mirror a door, so I went to the ModelEditor, opened a door file, and replaced the door with a mirror, and that colored boxes are still there and joints, etc. But when I go on the LevelEditor and place the Mirror Door, ingame the hand doesn't show up, so I cant open it. :/ How do I make the mirror a door? Quote:"I did that too, but it didn't work. Thanks for taking your time to help me RE: 3 Questions: Cave In and Destroying bookshelf - Cruzore - 06-20-2012 For 1 & 2: Under Entities>Special, there is the cave_in as an entity. So it has a active checkbox. This way you can set it inactive, set it active when you need to, add some sound and you got your cave in. For the 3rd: Under Entities>storage, you can use all bookshelves. Just use a AddUseItemCallback(look on the engine scripts page on the wiki for details) and you can set the shelf inactive as a result. Might want to either let the player fadeout, or force him to watch somewhere else, since seeing a shelf disappear is not that good. I am pretty sure there are other soultions for 3, but this is one. RE: 3 Questions: Cave In and Destroying bookshelf - Nervly - 06-20-2012 (06-20-2012, 01:22 PM)FastHunteR Wrote: For 1 & 2: Thank you so much, FastHunteR 1st and 2nd are solved. Is it possible to make Smoke on the bookshelf when it is destroyed, so the player doesn't see it disappearing because of the smoke? EDIT: Quote:void AddUseCallback(std:tring asItem, std:tring asEntity, std:tring asFunction); I think this is the one I have to use for the bookshelf. What do I do with it now? RE: 3 Questions: Cave In and Destroying bookshelf - Cruzore - 06-20-2012 Dissapearing, probably not. I myself couldn't find smoke thick enough for it to dissapear AND being able to deactivate it. You can just use a small fadeout() or make him look somewhere else. Maybe someone else finds a fitting thing. RE: 3 Questions: Cave In and Destroying bookshelf - Nervly - 06-20-2012 (06-20-2012, 01:45 PM)FastHunteR Wrote: Dissapearing, probably not. I myself couldn't find smoke thick enough for it to dissapear AND being able to deactivate it. You can just use a small fadeout() or make him look somewhere else. Maybe someone else finds a fitting thing.I guess I'll take on of the options Thanks once again. I editted my last post, if you could give it a look. Sorry for being bothering you btw :/ RE: 3 Questions: Cave In and Destroying bookshelf - Cruzore - 06-20-2012 Bothering? I have fun helping people So, that callback you stated, I couldn't even find it in the engine scripts page. Where did you get that one from? I would suggest use AddUseItemCallback. Go to the Engine scripts page on the wiki(http://wiki.frictionalgames.com/hpl2/amnesia/script_functions) and search for that callback to understand which is for what. Here's an example script: void OnStart() { AddUseItemCallback("", "hammer", "shelf", "DestroyShelf", true); } void DestroyShelf(string &in asItem, string &in asEntity) { //Do your stuff, whatever you want to do, here. Example: FadeOut(2); AddTimer("Timer_1", 2, "PlaySound"); } void PlaySound(string &in asTimer) { PlaySoundAtEntity("", "YOURBREAKSOUNDHERE.snt", "shelf", 0, false); AddTimer("Timer_2", 1, "FadeInFunction"); } void FadeInFunction(string &in asTimer) { FadeIn(2); } This script basically makes you fade out for 2 seconds after you used the hammer on the shelf, plays the sound you wish for, and after 1 second it fades back in for 2 seconds. RE: 3 Questions: Cave In and Destroying bookshelf - Nervly - 06-20-2012 (06-20-2012, 02:08 PM)FastHunteR Wrote: Bothering? I have fun helping peopleThat's good to hear Now I see why I couldn't find the AddUseItemCallback, I was in this website: http://wiki.frictionalgames.com/hpl1/documentation/script_reference Thanks for the script, where do I put it for it to work? RE: 3 Questions: Cave In and Destroying bookshelf - Cruzore - 06-20-2012 put the AddUseItemCallBack under void OnStart(), the rest comes somewhere not inside a function. Make sure to replace "hammer", "shelf" and "YOURBREAKSOUNDHERE.snt" with the name of your hammer/shelf and the name of the break sound. You'll have to search through the sound filder in the amnesia root for a good breaking sound. By the way, you were under hpl1, which is for penumbra games. This is why you got the wrong functions. RE: 3 Questions: Cave In and Destroying bookshelf - Nervly - 06-20-2012 (06-20-2012, 02:16 PM)FastHunteR Wrote: put the AddUseItemCallBack under void OnStart(), the rest comes somewhere not inside a function. Make sure to replace "hammer", "shelf" and "YOURBREAKSOUNDHERE.snt" with the name of your hammer/shelf and the name of the break sound. You'll have to search through the sound filder in the amnesia root for a good breaking sound.What I meant was where do I have to place it? Like in a notepad++ .txt file, or in-game in the hammer or something. I can't find a place where I can put it RE: 3 Questions: Cave In and Destroying bookshelf - Cruzore - 06-20-2012 use a .txt file, write it inside(youn can use notepad++) and save it as a .hps file with the name of your map it should work on. Example: map: test01.map script file:test01.hps you have to add the basic functions: OnStart() { } OnEnter() { } OnLeave() { } Then you can put the stuff inside and let wonders happen. You have to either use the developer environment and place the .map and .hps files under amnesia the dark descent>maps>yourcustomstorynamehere>maps Or make a custom story straight away, but you will also need a custom_story_settings.cfg file and possibly the extra_english.lang file(idk if that's optional or not). If you don't know how to make any of the both, you can either ask again or go to http://wiki.frictionalgames.com/hpl2/amnesia/custom_story Edit: .lang file is not optional |