RE: i need some help/ explaination
Door_B is on the Z-axis yes? Try one of these scripts. If one of them doesn't work use the other.
FIRST SCRIPT
Spoiler below!
void OnStart() { AddUseItemCallback("Player", "DoorLocked", "DoorOpenSlamming", "DOORopen", true); AddUseItemCallback("", "DoorLocked", "SlammingSound", "DOORopenSOUND", true); AddUseItemCallback("", "Key", "Door", "UseKeyOnDoor", true); SetLocalVarInt("DoorVar", 0); SetSwingDoorLocked("Door_A", true, true); SetSwingDoorLocked("Door_B", true, true); SetEntityPlayerInteractCallback("Door_A", "Slam_Door_B", false); }
void UseKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked(asEntity, false, true); RemoveItem(asItem); }
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, true); AddTimer("Ad", 0.35f, "AddForce"); }
void AddForce(string &in asTimer) { AddPropForce("Door_B", 0, 0, 5000, "World"); AddPropImpulse("Door_B", 0, 0, 6, "World"); }
SECOND SCRIPT
Spoiler below!
void OnStart() { AddUseItemCallback("Player", "DoorLocked", "DoorOpenSlamming", "DOORopen", true); AddUseItemCallback("", "DoorLocked", "SlammingSound", "DOORopenSOUND", true); AddUseItemCallback("", "Key", "Door", "UseKeyOnDoor", true); SetLocalVarInt("DoorVar", 0); SetSwingDoorLocked("Door_A", true, true); SetSwingDoorLocked("Door_B", true, true); SetEntityPlayerInteractCallback("Door_A", "Slam_Door_B", false); }
void UseKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked(asEntity, false, true); RemoveItem(asItem); }
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, true); AddTimer("Ad", 0.35f, "AddForce"); }
void AddForce(string &in asTimer) { AddPropForce("Door_B", 0, 0, -5000, "World"); AddPropImpulse("Door_B", 0, 0, -6, "World"); }
"Veni, vidi, vici."
"I came, I saw, I conquered."
|