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


Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New at HPS need help
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#2
RE: New at HPS need help

void OnStart()
{
AddUseItemCallback("", "key01", "Door01", "KeyOnDoor", true);
AddEntityCollideCallback("Player", "Script_slam01", "func_slam", true, 1);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Door01", false, true);
PlaySoundAtEntity("", "unlock_door", "Door01", 0, false);
RemoveItem("key01");
}

void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("Door01", true, true);

PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);

PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);

GiveSanityDamage(5.0f, true);
}

This works for me


Attached Files
.txt   New Text Document.txt (Size: 706 bytes / Downloads: 121)

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
(This post was last modified: 02-28-2012, 04:37 PM by jessehmusic.)
02-28-2012, 04:25 PM
Website Find


Messages In This Thread
New at HPS need help - by p1nky1337 - 02-28-2012, 03:18 PM
RE: New at HPS need help - by jessehmusic - 02-28-2012, 04:25 PM
RE: New at HPS need help - by p1nky1337 - 02-28-2012, 05:03 PM
RE: New at HPS need help - by jessehmusic - 02-28-2012, 10:28 PM
RE: New at HPS need help - by SilentStriker - 02-28-2012, 10:35 PM
RE: New at HPS need help - by jessehmusic - 02-29-2012, 05:15 PM
RE: New at HPS need help - by SilentStriker - 02-29-2012, 06:06 PM



Users browsing this thread: 1 Guest(s)