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 doesnt work.
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
RE: Script doesnt work.

You have 2 void OnStart()'s

PHP Code: (Select All)
void OnStart()
{
AddEntityCollideCallback("crowbar_joint_2""crowcollide""crowopen_func"true1);
AddUseItemCallback("""crowbar_1""prison_locked""activatecrowdoor"true);
AddUseItemCallback("""Downstairsdoor""cellar_wood01_slow""KeyOnDoor"true); 
}



void crowopen_func(string &in asParentstring &in asChildint alState)
{
SetSwingDoorLocked("prison_locked"falsetrue);
CreateParticleSystemAtEntity("""ps_break_wood.ps""area1"false);
SetEntityActive("crowbar_joint_2"false);
GiveSanityBoost();
PlaySoundAtEntity("""break_wood.snt""area1"0false);
SetSwingDoorClosed("prison_locked"falsetrue);
SetSwingDoorDisableAutoClose("prison_locked"true);
AddPropImpulse("prison_locked"00, -3"world");
}

void activatecrowdoor(string &in asItemstring &in asEntity)
{
SetEntityActive("crowbar_joint_2"true);
RemoveItem("crowbar_1");
}

void KeyOnDoor(string &in string &in door)
{
SetSwingDoorLocked("cellar_wood01_slow"falsetrue);
PlaySoundAtEntity("""unlock_door""cellar_wood01_slow"0false);
RemoveItem("Downstairskey");



The reason Downstairskey didn't work is because you didn't have "" around it.

(This post was last modified: 01-07-2012, 04:58 AM by flamez3.)
01-07-2012, 04:57 AM
Find


Messages In This Thread
Script doesnt work. - by kartanonperuna - 01-07-2012, 04:43 AM
RE: Script doesnt work. - by flamez3 - 01-07-2012, 04:57 AM
RE: Script doesnt work. - by kartanonperuna - 01-07-2012, 05:04 AM
RE: Script doesnt work. - by kartanonperuna - 01-07-2012, 06:08 AM
RE: Script doesnt work. - by flamez3 - 01-07-2012, 06:24 AM
RE: Script doesnt work. - by kartanonperuna - 01-07-2012, 06:26 AM
RE: Script doesnt work. - by flamez3 - 01-07-2012, 06:28 AM
RE: Script doesnt work. - by kartanonperuna - 01-07-2012, 06:31 AM
RE: Script doesnt work. - by flamez3 - 01-07-2012, 06:56 AM



Users browsing this thread: 3 Guest(s)