PutraenusAlivius
Posting Freak
Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation:
119
|
RE: i need some help/ explaination
The door is unlocked. I should probably add a little timer then. One minute.
EDIT:
No wonder. Your force is -1. It isn't enough. Won't even make anything.
Use this one below if the door is on the X axis.
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, false); AddPropForce("Door_B", 5000, 0, 0, "World"); }
Use this one below if the door is on the Z-axis.
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, false); AddPropForce("Door_B", 0, 0, 5000, "World"); }
"Veni, vidi, vici."
"I came, I saw, I conquered."
|
|