![]() |
secret bookshelf - 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 (https://www.frictionalgames.com/forum/forum-35.html) +--- Thread: secret bookshelf (/thread-8298.html) Pages:
1
2
|
secret bookshelf - xtron - 05-28-2011 How do I make a script that when I drag a lever a bookshelf moves and reveals an hidden door ?. RE: secret bookshelf - Mooserider - 05-28-2011 It's actually reasonably easy once you know how ![]() There are a couple ways though: First, if you want the shelf to slide to the left (I don't think you can make it slide to the right), Follow these steps: 1. Make a lever. Call it "Lever". Make it's settings whatever you want. 2. Place the "shelf_secret_door" entity. Name it "Shelf". 3. In the OnStart part of your script, put this: Code: ConnectEntities("door_connection", //Name of connection ![]() If you want to have the castlebase secret door slide up like in the actual game, put the secret door in the map (It's under "Door"), name it "secret_door" and copy and paste the above script in your OnStart section but change "Shelf" to "secret_door" Now, If you want the shelf to swing open like in the original game, It's a little bit more complicated. Follow these steps: 1. Make the lever in step 1 above. 2. Make a "shelf_secret_door_rot" entity. Name it Shelf. 3. Make an area at the right side of the shelf (Where it will pivot). Name it "RotateArea". 4. Go into the entity settings of the shelf and under "AngularOffsetArea" make it "RotateArea" with no quotes. 5. Add the above code. Things to note: 1. If you want to pull the lever up instead of down the easiest way is to change "false" in the script to "true". 2. To make a door like in Justine where you can pull up to open it and down to close it, change the "1" in the script to "0" and turn the lever upside down (At least that's what I had to do). And you should be done! If I've messed up and the script doesn't work, just tell me. Hope it helps! RE: secret bookshelf - xtron - 05-28-2011 It doesn't work :S Here's the script: Spoiler below!
Here's the bookshelf Spoiler below!
Here's the code: Spoiler below!
I tried the swing door part and it didn't work :/ RE: secret bookshelf - Exostalker - 05-28-2011 I would recommend to move rotate area a little bit more left, so that it would include a little bit of secret shelf... This works for me, I can't see any changes: Code: ... RE: secret bookshelf - xtron - 05-28-2011 I got a new ide. What's the script for draging the lever and a door destroys? I know it's something with Code: SetPropHealth("Shelf", -100); RE: secret bookshelf - Exostalker - 05-28-2011 Well in my opinion destroying it would be ultra unrealistic... RE: secret bookshelf - xtron - 05-28-2011 (05-28-2011, 07:31 PM)Exostalker Wrote: Well in my opinion destroying it would be ultra unrealistic... I didn't understand your code and the others aren't working :/ RE: secret bookshelf - Exostalker - 05-28-2011 Also, did you add RotateArea to your shelf angullaroffsetarea? Angullaroffsetarea is entity setting, if you choose your shelf you should see it. RE: secret bookshelf - xtron - 05-28-2011 Yea I did :/ RE: secret bookshelf - Mooserider - 05-28-2011 Is the name of the lever in the editor and the name of the lever in the script the same? Also, make sure that the bookshelf is the "shelf secret door rot.ent" entity. Sorry if you've already done this, but I can't see it in the picture you posted. If none of this works, I am truly sorry, but I don't know what would fix it. EDIT: I've put up a test map that I made. Hopefully if yours still doesn't work this map will help you. [attachment=1481] |