Help: How to make a lever? - 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: Help: How to make a lever? (/thread-6849.html) |
Help: How to make a lever? - Acies - 03-11-2011 Hi, excuse me for being lazy but sometimes asking makes a thing much easier. What I want to do: 1. Take "grunt_body_part1.ent" then attach it to a body (corpse_male_plague_cistern_1). This I know how to do. 2. Make that arm a lever. How do I do step 2 the easiest way - by scripting or by working in the model editor? Hope someone has experience with this! Thanks in advance Tried making a lever in the model editor, but when I add it to the map it gives me a crash report. RE: Help: How to make a lever? - Viperdream - 03-11-2011 Well, if it's like a normal lever then just add a script area on the side where the lever has to be to activate it. Like on the downside of the lever. I hope you know what I mean <.< Then use this callback to make the arm a lever. AddEntityCollideCallback("grunt_body_part1", "ScriptArea_1", "Collide_Armlever", false, 1); And this function: void Collide_Armlever(string &in asParent, string &in asChild, int alState) { SetEntityActive("whatever", true); //Or whatever you want to do } Then when you move the arm, the lever should activate. I'm not pro or anything so don't shoot me if it doesn't work :< RE: Help: How to make a lever? - Nye - 03-12-2011 It is impossible to get this to function as a lever without creating custom joints (in the model editor). I can't do this, so don't ask me how The alternative is to do what Viperdream said and have no animation (unless you want to add particle/player effects) once the player interacts with the hand. However, I don't think this is what you wanted RE: Help: How to make a lever? - nkmol - 03-12-2011 It isn't hard to make it in the Model editor, you can just see how it's done whith the normal lever. I made a couple of models too Whith the crash problem i can't help you, got the same problem though -.- RE: Help: How to make a lever? - Acies - 03-12-2011 Yes, I found it easy to make it in the model editor. The crash frustrates me though. I want to solve it. RE: Help: How to make a lever? - Acies - 03-17-2011 Anyone? Someone who knows how to make a lever in the model editor? (A lever which does not crash the map) RE: Help: How to make a lever? - Pandemoneus - 03-17-2011 Got no experience with the model editor, sorry. RE: Help: How to make a lever? - Acies - 03-17-2011 It cost me dearly on the sanity-meter, but I managed to get it to work. If someone would be interested in how I could explain certain steps which might be confusing. The rest is simply copy-paste from an original lever. |