Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with Crowbar script!
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#5
RE: Problem with Crowbar script!

Sorry bout' my script of doom...

Here is the main part I am focusing on. Smile



void UseCrowbarOnDoor(string &in asItem, string &in asEntity)
{
AddTimer(asEntity, 0.2, "TimerSwitchShovel");
PlaySoundAtEntity("pickupcrow","player_crouch.snt", "Player", 0.05, false);

//Remove callback incase player never touched door
SetEntityPlayerInteractCallback("cellar_wood01_slow_2", "", true);
SetEntityPlayerInteractCallback("AreaUseCrowbar", "", true);

RemoveItem(asItem);
}
void TimerSwitchShovel(string &in asTimer)
{
PlaySoundAtEntity("attachshovel","puzzle_place_jar.snt", asTimer, 0, false);

SetEntityActive("crowbar_joint_1", true);
}
void CollideAreaBreakDoor(string &in asParent, string &in asChild, int alState)
{
GiveSanityBoostSmall();

PlayMusic("10_puzzle01.ogg", false, 0.7, 0.1, 10, false);

SetSwingDoorLocked("cellar_wood01_slow_2", false, false);
SetSwingDoorDisableAutoClose("cellar_wood01_slow_2", true);
SetSwingDoorClosed("cellar_wood01_slow_2", false,false);

PlaySoundAtEntity("break","break_wood_metal", "AreaBreakEffect", 0, false);
CreateParticleSystemAtEntity("breakps", "ps_hit_wood", "AreaBreakEffect", false);
AddPropImpulse("cellar_wood01_slow_2", -3, 0, 0, "world");

SetEntityActive("crowbar_joint_1", false);
SetEntityActive("crowbar_dyn_1", true);

AddTimer("pushdoor", 0.1, "TimerPushDoor");
AddTimer("voice2", 1, "TimerDanielVoices");

AddDebugMessage("Break door!", false);
}
void TimerPushDoor(string &in asTimer)
{
AddPropImpulse("cellar_wood01_slow_2", -1, 2, -4, "world");
AddTimer("doorclose", 1.1, "TimerDoorCanClose");
}

void TimerDoorCanClose(string &in asTimer)
{
SetSwingDoorDisableAutoClose("cellar_wood01_slow_2", false);
}
void OnEnter()
{
}
void OnLeave()
{
}

10-18-2010, 01:58 AM
Find


Messages In This Thread
Problem with Crowbar script! - by Kyle - 10-17-2010, 05:08 PM
RE: Problem with Crowbar script! - by Kyle - 10-17-2010, 10:22 PM
RE: Problem with Crowbar script! - by theDARKW0LF - 10-18-2010, 01:38 AM
RE: Problem with Crowbar script! - by Datenshi92 - 10-18-2010, 01:48 AM
RE: Problem with Crowbar script! - by Kyle - 10-18-2010, 01:58 AM
RE: Problem with Crowbar script! - by Kyle - 10-18-2010, 11:10 AM
RE: Problem with Crowbar script! - by jens - 10-18-2010, 11:17 AM
RE: Problem with Crowbar script! - by Kyle - 10-18-2010, 11:45 AM
RE: Problem with Crowbar script! - by Kyle - 10-18-2010, 09:23 PM



Users browsing this thread: 1 Guest(s)