Quick question with script! - 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: Quick question with script! (/thread-8804.html) |
Quick question with script! - SLAMnesia - 06-26-2011 I have an entity named 'bored1' (its a wooden plank lol). I want it to have 'StaticPhysics' but when you click on it, it becomes non-static. I just don't know the function for that so it'd be appreciated to help! thanks RE: Quick question with script! - Tanshaydar - 06-26-2011 void SetPropStaticPhysics(string& asName, bool abX); Activates/deactivates the physics of a prop. Setting as true will make entities static in midair. For this and more: http://wiki.frictionalgames.com/hpl2/amnesia/script_functions RE: Quick question with script! - palistov - 06-26-2011 You can't interact with static objects, only entities. To get around this, create a script area that fits and wraps around the board. Name it "board_area". Under the Area tab, fill in the field 'PlayerInteractCallback' with "BoardPhysicsOn". Make sure PlayerInteractCallbackAutoRemove is checked. In your script, put this function void BoardPhysicsOn(string &in entity) { SetPropStaticPhysics("bored1", false); SetEntityInteractionDisabled("board_area", true); } |