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
Need help with scripting!
Zaapeer Offline
Junior Member

Posts: 32
Threads: 9
Joined: Dec 2011
Reputation: 0
#13
RE: Need help with scripting!

(12-28-2011, 02:53 PM)SilentStriker Wrote: Have you got it to work? Smile becuse i think i know what the problem is Smile

If im not mistaken it should look like this:
(12-27-2011, 07:56 PM)Zaapeer Wrote: void OnStart()

{
AddEntityCollideCallback("Player", "door_slamHousekeeper", "func_slam", true, 1);
AddUseItemCallback("", "FirstRoomKey_1", "BedroomDoorFirst_1", "unlock_door", true);
AddEntityCollideCallback("Player", "NoOil", "Collide_Area", true, 1);

}

void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("HousekeeperDoor", true, false);
PlaySoundAtEntity("DoorSlamSound", "scare_slam_door.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
}

void Collide_Area(string &in asParent, string &in asChild, int alState)
{
SetPlayerLampOil(0.0f);
}

void unlock_door(string &in FirstRoomKey_1, string &in BedroomDoorFirst_1)
{
SetSwingDoorLocked(BedroomDoorFirst_1, false, true);
PlaySoundAtEntity("", "unlock_door", BedroomDoorFirst_1, 0, false);
RemoveItem(FirstRoomKey_1);
}

void OnEnter()
{


}

void OnLeave()
{

}
the bolded ones is the ones I moved Smile You need to have them in either void onstart, void onenter or void onleave


Correct me if i'm mistaken Smile
Thanks dude it worked! AWESOME
12-28-2011, 03:19 PM
Find


Messages In This Thread
Need help with scripting! - by Zaapeer - 12-27-2011, 07:56 PM
RE: Need help with scripting! - by Your Computer - 12-27-2011, 09:25 PM
RE: Need help with scripting! - by Zaapeer - 12-28-2011, 09:53 AM
RE: Need help with scripting! - by ferryadams10 - 12-28-2011, 10:07 AM
RE: Need help with scripting! - by Zaapeer - 12-28-2011, 11:42 AM
RE: Need help with scripting! - by flamez3 - 12-28-2011, 02:31 PM
RE: Need help with scripting! - by Tripication - 12-28-2011, 11:47 AM
RE: Need help with scripting! - by Zaapeer - 12-28-2011, 12:07 PM
RE: Need help with scripting! - by ferryadams10 - 12-28-2011, 02:47 PM
RE: Need help with scripting! - by SilentStriker - 12-28-2011, 02:53 PM
RE: Need help with scripting! - by ferryadams10 - 12-28-2011, 03:04 PM
RE: Need help with scripting! - by SilentStriker - 12-28-2011, 03:24 PM
RE: Need help with scripting! - by flamez3 - 12-28-2011, 03:05 PM
RE: Need help with scripting! - by Zaapeer - 12-28-2011, 03:19 PM



Users browsing this thread: 1 Guest(s)