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
i need some help/ explaination
Headless Offline
Junior Member

Posts: 20
Threads: 3
Joined: Dec 2014
Reputation: 0
#9
RE: i need some help/ explaination

Thanks Im gonna test it right away

changed my door names to Door_A and Door_B Sound to Slam right?

ANd i get error 14.1

void OnStart()
{
AddUseItemCallback("Player", "DoorLocked", "DoorOpenSlamming", "DOORopen", true);
AddUseItemCallback("", "DoorLocked", "SlammingSound", "DOORopenSOUND", true);
AddUseItemCallback("", "Key", "Door", "UseKeyOnDoor", true);
}

void UseKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
RemoveItem(asItem);
}

{ //here
SetLocalVarInt("DoorVar", 0);
SetSwingDoorLocked("Door_A", true, true);
SetSwingDoorLocked("Door_B", true, true);
SetEntityPlayerInteractCallback("Door_A", "Slam_Door_B", false);
}

void Slam_Door_B(string &in asEntity)
{
AddLocalVarInt("DoorVar", 1);
DoorCheck();
}

void DoorCheck()
{
if(GetLocalVarInt("DoorVar") == 10) //Indicates you have to interact with it ten(10) times
{
AddTimer("Slam", 2.75f, "Slam");
}
}

void Slam(string &in asTimer)
{
SetSwingDoorLocked("Door_B", false, false);
AddPropForce("Door_B", -1, 0, 0, "World"); //Change the Z or X argument (X is the first zero, Z is the last zero) to fit your door's alignment
}

Maybe i think i didnt put it in right but not sure how to do it

Sorry im kinda new to scripting and mostly use tutorials and trail and error.
(This post was last modified: 12-24-2014, 02:25 PM by Headless.)
12-24-2014, 02:14 PM
Find


Messages In This Thread
i need some help/ explaination - by Headless - 12-24-2014, 01:28 AM
RE: i need some help/ explaination - by Kurton - 12-24-2014, 02:13 AM
RE: i need some help/ explaination - by Headless - 12-24-2014, 11:08 AM
RE: i need some help/ explaination - by Headless - 12-24-2014, 12:43 PM
RE: i need some help/ explaination - by Headless - 12-24-2014, 01:52 PM
RE: i need some help/ explaination - by Headless - 12-24-2014, 02:14 PM
RE: i need some help/ explaination - by Headless - 12-24-2014, 02:58 PM
RE: i need some help/ explaination - by Headless - 12-24-2014, 04:46 PM
RE: i need some help/ explaination - by Headless - 12-24-2014, 11:43 PM
RE: i need some help/ explaination - by L00T3R123 - 12-25-2014, 04:29 AM
RE: i need some help/ explaination - by Headless - 12-25-2014, 12:26 PM
RE: i need some help/ explaination - by Headless - 12-25-2014, 01:43 PM
RE: i need some help/ explaination - by Romulator - 12-26-2014, 05:35 AM
RE: i need some help/ explaination - by Headless - 12-26-2014, 01:03 PM
RE: i need some help/ explaination - by Headless - 12-26-2014, 05:48 PM
RE: i need some help/ explaination - by Headless - 12-26-2014, 06:22 PM
RE: i need some help/ explaination - by Traggey - 12-26-2014, 06:56 PM
RE: i need some help/ explaination - by Headless - 12-26-2014, 07:21 PM
RE: i need some help/ explaination - by Headless - 12-26-2014, 10:23 PM
RE: i need some help/ explaination - by Headless - 12-27-2014, 02:20 AM
RE: i need some help/ explaination - by Headless - 12-27-2014, 01:11 PM
RE: i need some help/ explaination - by Daemian - 12-27-2014, 04:34 PM



Users browsing this thread: 3 Guest(s)