Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Crow bar and a Body
Author Message
clock123 Offline
Member

Posts: 76
Joined: Jul 2011
Reputation: 0
Post: #1
Crow bar and a Body
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.
08-08-2011 07:42 PM
Find all posts by this user Quote this message in a reply
Dizturbed Offline
Member

Posts: 160
Joined: Jun 2011
Reputation: 0
Post: #2
RE: Crow bar and a Body
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

08-08-2011 07:54 PM
Find all posts by this user Quote this message in a reply
clock123 Offline
Member

Posts: 76
Joined: Jul 2011
Reputation: 0
Post: #3
RE: Crow bar and a Body
can you please be more specific? Sad I really dont know what to input and where, please help if you can Sad
(This post was last modified: 08-08-2011 10:23 PM by clock123.)
08-08-2011 08:42 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)