| 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.)
 |