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 is just... broken?
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#7
RE: Script is just... broken?

It's okay guys, it worked when I fixed the script.
I also got another problem... I looked in the script functions and couldn't find the right one that made something happen when you, in this case, read a note that you pick up. So I just tried as a last resort to use another scripting callback.

void OnStart()
{
PreloadSound("00_laugh.snt");
AddEntityCollideCallback("Player" , "note_scroll_1" , "Collapse" , true , 1);
AddUseItemCallback("" , "Needle" , "CastleDoor2" , "UsedNeedleOnDoor" , false);
AddEntityCollideCallback("Player" , "ScriptArea_1" , "Collide01" , true , 1);
SetPlayerLampOil(0);
}
void Collide01(string &in asParent , string &in asChild , int alState)
{
SetSwingDoorClosed("CastleDoor" , true , true);
GiveSanityDamage(10 , true);
}
void UsedNeedleOnDoor(string &in asItem , string &in asEntity)
{
PlaySoundAtEntity("UnlockSound" , "unlock_door.snt" , asEntity , 0.0f , false);
SetSwingDoorLocked(asEntity , false , true);
SetLevelDoorLocked(asEntity , false);
}
void Collapse(string &in asParent , string&in asCild , int alState)
{
SetEntityActive("wooden_board01_1" , true);
SetEntityActive("rock_debris01_1" , true);
SetEntityActive("rock_debris03_1" , true);
PlaySoundAtEntity("LaughSound" , "00_laugh.snt" , "Player" , 0 , true);
}
void OnEnter()
{
}
void OnLeave()
{
}

(This post was last modified: 10-15-2010, 11:46 PM by Kyle.)
10-15-2010, 11:44 PM
Find


Messages In This Thread
Script is just... broken? - by Kyle - 10-15-2010, 02:02 AM
RE: Script is just... broken? - by DamnNoHtml - 10-15-2010, 06:24 AM
RE: Script is just... broken? - by Kyle - 10-15-2010, 11:12 AM
RE: Script is just... broken? - by SLi78 - 10-15-2010, 05:11 PM
RE: Script is just... broken? - by Chilton - 10-15-2010, 05:52 PM
RE: Script is just... broken? - by Entih - 10-15-2010, 06:15 PM
RE: Script is just... broken? - by Kyle - 10-15-2010, 11:44 PM
RE: Script is just... broken? - by Entih - 10-16-2010, 02:37 AM
RE: Script is just... broken? - by Kyle - 10-16-2010, 02:48 AM
RE: Script is just... broken? - by Entih - 10-16-2010, 03:08 AM
RE: Script is just... broken? - by Kyle - 10-16-2010, 03:48 PM
RE: Script is just... broken? - by Entih - 10-16-2010, 05:58 PM
RE: Script is just... broken? - by Kyle - 10-17-2010, 01:40 AM
RE: Script is just... broken? - by Entih - 10-17-2010, 01:43 AM
RE: Script is just... broken? - by Kyle - 10-17-2010, 01:58 AM
RE: Script is just... broken? - by Equil - 10-17-2010, 02:04 AM
RE: Script is just... broken? - by Kyle - 10-17-2010, 03:02 AM



Users browsing this thread: 1 Guest(s)