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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Request Lantern Off
Ongka Offline
Member

Posts: 225
Threads: 3
Joined: Nov 2010
Reputation: 20
#5
RE: Lantern Off

void OnStart()
{
AddEntityCollideCallback("Player", "AreaDoor", "CollideDoor", true, 1);
}

void CollideDoor(string &in asParent, string &in asChild, int alState)
{
AddPropImpulse("door", 0, 0, 20, "World"); // 0, 0, 20 are the x y z coordinates. You may have to adjust them a bit.
GiveSanityDamage(6.0f, true);
PlaySoundAtEntity("", "hit_wood.snt", "door", 0.0f, false);
AddTimer("DoorTimer", 1.0f, "TimerDoor");
}

void TimerDoor(string &in asTimer)
{
AddPropImpulse("door", 0, 0, 20, "World");
PlaySoundAtEntity("", "scare_male_terrified.snt", "door", 0.0f, false);
SetPropHealth("door", 20); //Only if you wish to damage the door.
}

[Image: 18694.png]
05-29-2011, 06:34 PM
Find


Messages In This Thread
Lantern Off - by laser50 - 05-29-2011, 04:35 PM
RE: Lantern Off - by Tanshaydar - 05-29-2011, 05:04 PM
RE: Lantern Off - by Ongka - 05-29-2011, 05:04 PM
RE: Lantern Off - by laser50 - 05-29-2011, 05:55 PM
RE: Lantern Off - by Ongka - 05-29-2011, 06:34 PM
RE: Lantern Off - by laser50 - 05-29-2011, 08:19 PM



Users browsing this thread: 2 Guest(s)