[CHAOS] Lowering bridge(Still need help!) - 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: [CHAOS] Lowering bridge(Still need help!) (/thread-19973.html) |
Lowering bridge(Still need help!) - assassinhawk45 - 01-18-2013 Once again I need help. I am trying to use a lever to lower a chained bridge. Is there a script for this? RE: Lowering bridge - palistov - 01-18-2013 http://wiki.frictionalgames.com/hpl2/amnesia/script_functions Look for the function SetMoveObjectStateExt(...) It has parameters for speed, acceleration, etc. RE: Lowering bridge - Adny - 01-18-2013 I just checked out how its used in the cistern level, and its something like this: BreakJoint("NAMEOFBRIDGE_BallJoint_1"); I suppose it breaks the joint in the model represented by the chain. RE: Lowering bridge - assassinhawk45 - 01-18-2013 Should the _ before Balljoint_1 be a comma? I tried this and it didn't work, so I think that's what happened RE: Lowering bridge - assassinhawk45 - 01-19-2013 Here's my script //////////////////////////// // Run when starting map void OnStart() { SetEntityConnectionStateChangeCallback("lever", "func_shelf"); SetEntityCallbackFunc("oil_scare", "OnPickup"); SetEntityConnectionStateChangeCallback("lever_1", "BreakJoint"); } void func_shelf(string &in asEntity, int alState) { if (alState == 1) { SetEntityActive("fail_1", true); } } void OnPickup(string &in asEntity, string &in type) { SetEntityActive("grunt_head", true); } void BreakJoint (string& asName); { BreakJoint("bridge_BallJoint_1"); } |