![]() |
[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) |
RE: 3 Questions: Cave In and Destroying bookshelf - Cruzore - 07-04-2012 poste that script part? Edit: Actually, let me explain it like that to you: the .snt file is not a sound, but a file to modify the settings of it. Also, it chooses which sounds(.ogg's) to play when you play the .snt file. It basically plays a random .ogg within it's reach(edit it with notepad or similiar and you'll see what I mean). If you want to play a specified sound, you can either create a .snt yourself and add it to your custom story folder with a different name, in which you declare only 1 .ogg who is to be played, OR you simply use PlayMusic, in which you choose from which monster to play. For the example, since it would be hard to understand without: PlayMusic("brute/amb_idle02.ogg", false, 1, 0, 1, false); brute can be replaced with grunt or suitor . This is needed to specify which amb_idle02 to use, since there are 3(1 for each enemy). However, if you "just" want to play the .snt of grunt or brute, look at my next post. If you want to play a certain sound(Like any .ogg), use PlayMusic and the .ogg, if you want to play a random sound from a range(Like 1 of 4 sounds from the grunt), use PlaySoundAtEntity and the .snt. If there is a .snt file for a single .ogg only, you should use the .snt file instead since sounds seem easier to handle than music. So, you should use the .snt if you don't care about random or if it's just 1 anyway, and .ogg if you want a special one out of many, if the sound should loop or if there's no .snt(like background music and such, which should loop) RE: 3 Questions: Cave In and Destroying bookshelf - Nervly - 07-04-2012 (07-04-2012, 01:04 AM)FastHunteR Wrote: poste that script part?Sorry, I forgot. I did google it, but couldn't find the solution ![]() Here it is: Spoiler below!
I changed to .snt again. When I tried with PlayMusic I had it like this: Spoiler below!
RE: 3 Questions: Cave In and Destroying bookshelf - Cruzore - 07-04-2012 Nevermind, found the way to use the .snt of the grunt/brute only after looking in the main game's archives: PlaySoundAtEntity("enemy", "enemy/grunt/amb_idle.snt", "AreaDustScrape_6", 0, false); With this, you specify which enemy to use the .snt from. Look at my previous post for some explanation, the solution I couldn't find is this one. RE: 3 Questions: Cave In and Destroying bookshelf - Nervly - 07-04-2012 Thanks a lot! It now plays only the amb_idle02.ogg file I want ![]() It looked like it was playing every .ogg file because it was really weird and long sound. I used PlayMusic("grunt/amb_idle02.ogg", false, 1, 0, 1, false); Thanks once again. +1 Rep EDIT: Hey there ![]() So, I made that when you interact with a statue, something will happen. But in-game the "hand" picture appears in every part of the statue, but I only want to interact with the head. So when the player interacts with the head, that something will happen. How can I do that? P.S.: The statue I'm talking about is the Knight one RE: 3 Questions: Cave In and Destroying bookshelf - Cruzore - 07-06-2012 I myself haven't found a good way, but here is 1 that is..acceptable: place the full armor somewhere, and place a head(a single head) inside the head of the full armor, but in such a way that it looks like 1. tick Static physics at both the head and the complete. then, use this: inside OnStart or where ever you want: SetEntityPlayerInteractCallback("armour_nice_head_1", "DoSomeRandom", true); void DoSomeRandom(string &in asEntity) { SetPropStaticPhysics("armour_nice_head_1", false); SetEntityActive("armour_nice_head_1", false); SetPropStaticPhysics("armour_nice_complete_1", false); AddPropForce("armour_nice_complete_1", 0, 100, 200, "world"); } This basically only allows the pick up for the head, which becomes non-static and removed, the armor becomes non-static and you add some small prop force so the head pops out and on the ground(without that pop out effect, it just doesn't look right.) The stuff to happen will get inside that function, too. Of course there are other ways: Another way would be to place 4 script areas around the head of the complete armor, and use a Entity Collide Callback to happen when the complete suit touches any script area. A bit tricky to do, but it might work better than the above example(what ever fits you more). Maybe there is another way to alter the user variables of the complete armor in the model editor, or altering the armor some other way in the model editor. No idea on that though. RE: 3 Questions: Cave In and Destroying bookshelf - Nervly - 07-06-2012 Spoiler below!
Hmm, didn't though on the 2nd one. But I used the 1st, and it works like I wanted ![]() I really want to thank you for all your help along the dev of my custom story. Without it, I wouldn't be able to make it. Thanks a bunch ^^ You will be without any doubt in the credits. +1 Rep ![]() RE: 3 Questions: Cave In and Destroying bookshelf - Nervly - 09-13-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? RE: 3 Questions: Cave In and Destroying bookshelf - Robby - 09-13-2012 Open your model in the ModelEditor, go to "User Defined Variables" in Settings (I think), and there should be a drop-down arrow at the top of the new window. Look through there, and use "SwingDoor". That should work. RE: 3 Questions: Cave In and Destroying bookshelf - Nervly - 09-14-2012 (09-13-2012, 06:42 PM)Nemet Robert Wrote: Open your model in the ModelEditor, go to "User Defined Variables" in Settings (I think), and there should be a drop-down arrow at the top of the new window. Look through there, and use "SwingDoor".Sorry, I forgot to mention I did that ![]() It didn't work tho, the hand didn't appear :/ Thanks for the answer ^^ RE: 3 Questions: Cave In and Destroying bookshelf - Nervly - 09-21-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:" Open your model in the ModelEditor, go to "User Defined Variables" in Settings (I think), and there should be a drop-down arrow at the top of the new window. Look through there, and use "SwingDoor". "I did that too, but it didn't work. Thanks for taking your time to help me ![]() *bump* |