Asaratha
Junior Member
Posts: 14
Threads: 5
Joined: Jul 2011
Reputation:
0
|
Door set to locked, still unlocked.
Hello again.
I have a door in my level called "sewer_arched_2", it is set to "Locked" in the Entity tab.
I also have a script for a hollow needle on the door:
void OnStart()
{
AddUseItemCallback("", "hollow_needle_1", "sewer_arched_2", "KeyOnDoor", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("sewer_arched_2", false, true);
PlaySoundAtEntity("", "unlock_door", "sewer_arched_2", 0, false);
RemoveItem("hollow_needle_1");
}
Any other script I have currently is working, as well as another key I have put in the "KeyOnDoor" function. If you would like to see my entire .hps file, I'll PM it to you.
|
|
03-15-2012, 02:28 PM |
|
ClayPigeon
Member
Posts: 214
Threads: 13
Joined: Mar 2012
Reputation:
8
|
RE: Door set to locked, still unlocked.
What is the problem? I don't get it... If the problem is that the door is not unlocked, try this:
void KeyOnDoor(string &in item, string &in door)
{
SetSwingDoorLocked(door, false, true);
PlaySoundAtEntity("", "unlock_door", door, 0, false);
RemoveItem(item);
}
Copy it as it is and don't change anything, tell me if it's unlocking now.
|
|
03-15-2012, 02:34 PM |
|
Asaratha
Junior Member
Posts: 14
Threads: 5
Joined: Jul 2011
Reputation:
0
|
RE: Door set to locked, still unlocked.
(03-15-2012, 02:34 PM)ClayPigeon Wrote: What is the problem? I don't get it... If the problem is that the door is not unlocked, try this:
void KeyOnDoor(string &in item, string &in door)
{
SetSwingDoorLocked(door, false, true);
PlaySoundAtEntity("", "unlock_door", door, 0, false);
RemoveItem(item);
}
Copy it as it is and don't change anything, tell me if it's unlocking now. Oops, it seems I have forget to say the problem. Without unlocking the door, it's already unlocked. So, regardless of the fact I have it set to "Locked", it's always unlocked.
|
|
03-15-2012, 04:25 PM |
|
Stepper321
Senior Member
Posts: 263
Threads: 26
Joined: Nov 2011
Reputation:
8
|
RE: Door set to locked, still unlocked.
(03-15-2012, 04:25 PM)Asaratha Wrote: (03-15-2012, 02:34 PM)ClayPigeon Wrote: What is the problem? I don't get it... If the problem is that the door is not unlocked, try this:
void KeyOnDoor(string &in item, string &in door)
{
SetSwingDoorLocked(door, false, true);
PlaySoundAtEntity("", "unlock_door", door, 0, false);
RemoveItem(item);
}
Copy it as it is and don't change anything, tell me if it's unlocking now. Oops, it seems I have forget to say the problem. Without unlocking the door, it's already unlocked. So, regardless of the fact I have it set to "Locked", it's always unlocked. try
for a swing door.
or
For level door
Depends if you have aswing door or level door
Signature to awesome to be displayed.
(This post was last modified: 03-15-2012, 04:34 PM by Stepper321.)
|
|
03-15-2012, 04:33 PM |
|
Asaratha
Junior Member
Posts: 14
Threads: 5
Joined: Jul 2011
Reputation:
0
|
RE: Door set to locked, still unlocked.
(03-15-2012, 04:33 PM)Stepper321 Wrote: (03-15-2012, 04:25 PM)Asaratha Wrote: (03-15-2012, 02:34 PM)ClayPigeon Wrote: What is the problem? I don't get it... If the problem is that the door is not unlocked, try this:
void KeyOnDoor(string &in item, string &in door)
{
SetSwingDoorLocked(door, false, true);
PlaySoundAtEntity("", "unlock_door", door, 0, false);
RemoveItem(item);
}
Copy it as it is and don't change anything, tell me if it's unlocking now. Oops, it seems I have forget to say the problem. Without unlocking the door, it's already unlocked. So, regardless of the fact I have it set to "Locked", it's always unlocked. try
for a swing door.
or
For level door
Depends if you have aswing door or level door The door is now locked, although, even if I use the hollow needle, the door is still locked.
|
|
03-15-2012, 04:58 PM |
|
|