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
Script Help Door
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#3
RE: Door


This should work. Includes the wind sound. If the sound does not play, you will have to make a Script Area near the door, title it something and change the name at: "PlaySoundAtEntity("", "general_wind_whirl.snt", "castle_1", 0, false);" to the name of the Script Area and it will work fine. Also, organizing your script with "Enter"s and "Tab"s can help a LOT.

Your issues(fixed):
- An entity collide does not have "bool abEffects", It is "int alState".
- SetSwingDoorLocked was spelled: "setSwingDoorLocked" again with the capitalizations buddy =]

Just copy and paste this all.

void OnStart()
{
AddEntityCollideCallback("Player", "Shut1", "CloseDoors", true, 1);
}
void OnEnter()
{
}
void OnLeave()
{
}

void CloseDoors(string &in asParent, bool abChild, int alState)
{
SetSwingDoorLocked("castle_1", true, true);
PlaySoundAtEntity("", "general_wind_whirl.snt", "castle_1", 0, false);
}



(This post was last modified: 11-09-2011, 10:46 PM by Statyk.)
11-09-2011, 10:40 PM
Find


Messages In This Thread
Door - by proshitness - 11-09-2011, 09:15 PM
RE: Door - by flamez3 - 11-09-2011, 10:39 PM
RE: Door - by Statyk - 11-09-2011, 10:40 PM
RE: Door - by proshitness - 11-11-2011, 01:24 PM
RE: Door - by flamez3 - 11-11-2011, 01:40 PM
RE: Door - by proshitness - 11-11-2011, 02:45 PM
RE: Door - by flamez3 - 11-11-2011, 03:11 PM
RE: Door - by proshitness - 11-11-2011, 04:57 PM
RE: Door - by Unearthlybrutal - 11-11-2011, 05:29 PM
RE: Door - by proshitness - 11-11-2011, 06:49 PM
RE: Door - by flamez3 - 11-11-2011, 07:00 PM
RE: Door - by proshitness - 11-11-2011, 08:31 PM
RE: Door - by Statyk - 11-11-2011, 08:37 PM
RE: Door - by proshitness - 11-11-2011, 08:41 PM
RE: Door - by Statyk - 11-11-2011, 08:44 PM
RE: Door - by proshitness - 11-19-2011, 12:50 AM
RE: Door - by JenniferOrange - 11-19-2011, 01:03 AM
RE: Door - by proshitness - 11-20-2011, 04:40 PM
RE: Door - by Your Computer - 11-20-2011, 06:49 PM
RE: Door - by Statyk - 11-20-2011, 05:06 PM
RE: Door - by flamez3 - 11-21-2011, 07:47 AM
RE: Door - by Statyk - 11-22-2011, 12:35 AM
RE: Door - by flamez3 - 11-22-2011, 11:17 AM
RE: Door - by Statyk - 11-22-2011, 10:21 PM



Users browsing this thread: 1 Guest(s)