![]() |
Crow bar and a Body - 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: Crow bar and a Body (/thread-9654.html) |
Crow bar and a Body - clock123 - 08-08-2011 Hello, I want to make a crow bar open a certain door and a body bursting out from a closet when stepping in into a certain area, how do I make these things happen?, I dont really have scripting knowledge, so.. yeah. Please help, if not both at least one. RE: Crow bar and a Body - Dizturbed - 08-08-2011 AddPropImpulse("corpse_male_1", 0, -100, 0, "world"); For example.. - { AddUseItemCallback("", "crowbar_1", "AreaUseCrowbar", "UseCrowbar", true); AddEntityCollideCallback("crowbar_joint", "ScriptArea_2", "BrokenActive", true, 1); } void UseCrowbar(string &in asItem, string &in asEntity) { SetEntityActive("crowbar_joint", true); PlaySoundAtEntity("pickupcrow","player_crouch.snt", "Player", 0.05, false); SetEntityPlayerInteractCallback("AreaUseCrowbar", "", true); RemoveItem("crowbar_1"); } void BrokenActive(string &in asParent, string &in asChild, int alState) { SetEntityActive("crowbar_joint", false); SetEntityActive("cellar_wood01_4", true); SetEntityActive("cellar_wood01_2", false); SetEntityActive("broken", true); SetEntityActive("block", false); SetEntityActive("crowbar_broken", true); CreateParticleSystemAtEntity("", "ps_hit_wood", "AreaBreakEffect", false); PlaySoundAtEntity("lurker_hit_wood", "lurker_hit_wood.snt", "cellar_wood01_4", 2.0f, false); } here you go, an example =) -Dizturbed RE: Crow bar and a Body - clock123 - 08-08-2011 can you please be more specific? ![]() ![]() |