Itskody
Member
Posts: 100
Threads: 30
Joined: Mar 2011
Reputation:
1
|
lock door help
I have a locked level door, but i cant use my key on it to unlock it, here is my script for it..
void OnStart() { AddUseItemCallback("", "key_tower_1", "door_2", "UsedKeyUpstairs", true); }
void UsedKeyUpstairs(string &in asItem, string &in asEntity) { SetLevelDoorLocked("door_2",false); PlaySoundAtEntity("", "unlock_door", "door_2", 0, false); RemoveItem("key_tower_1"); SetLevelDoorLockedText("door_2", "Levels", "Upstairs"); }
Is something wrong here?
|
|
04-06-2011, 06:27 AM |
|
Russ Money
Senior Member
Posts: 360
Threads: 25
Joined: Dec 2010
Reputation:
4
|
RE: lock door help
(04-06-2011, 06:27 AM)Itskody Wrote: I have a locked level door, but i cant use my key on it to unlock it, here is my script for it..
void OnStart() { AddUseItemCallback("", "key_tower_1", "door_2", "UsedKeyUpstairs", true); }
void UsedKeyUpstairs(string &in asItem, string &in asEntity) { SetLevelDoorLocked("door_2",false); PlaySoundAtEntity("", "unlock_door", "door_2", 0, false); RemoveItem("key_tower_1"); SetLevelDoorLockedText("door_2", "Levels", "Upstairs"); }
Is something wrong here?
The doors you're trying to unlock are level doors? Not swing doors?
|
|
04-06-2011, 06:37 AM |
|
Itskody
Member
Posts: 100
Threads: 30
Joined: Mar 2011
Reputation:
1
|
RE: lock door help
(04-06-2011, 06:37 AM)Russ Money Wrote: (04-06-2011, 06:27 AM)Itskody Wrote: I have a locked level door, but i cant use my key on it to unlock it, here is my script for it..
void OnStart() { AddUseItemCallback("", "key_tower_1", "door_2", "UsedKeyUpstairs", true); }
void UsedKeyUpstairs(string &in asItem, string &in asEntity) { SetLevelDoorLocked("door_2",false); PlaySoundAtEntity("", "unlock_door", "door_2", 0, false); RemoveItem("key_tower_1"); SetLevelDoorLockedText("door_2", "Levels", "Upstairs"); }
Is something wrong here?
The doors you're trying to unlock are level doors? Not swing doors?
Yes i have it set so i need to get a key to unlock a level door to a different area. This is the only locked level door i will be using and for some reason i cant get it working
(This post was last modified: 04-06-2011, 06:38 AM by Itskody.)
|
|
04-06-2011, 06:37 AM |
|
Russ Money
Senior Member
Posts: 360
Threads: 25
Joined: Dec 2010
Reputation:
4
|
RE: lock door help
Just to verify, is the problem, not being able to use the key on the door or the key isn't unlocking the door?
|
|
04-06-2011, 06:40 AM |
|
Itskody
Member
Posts: 100
Threads: 30
Joined: Mar 2011
Reputation:
1
|
RE: lock door help
(04-06-2011, 06:40 AM)Russ Money Wrote: Just to verify, is the problem, not being able to use the key on the door or the key isn't unlocking the door?
not being able to use the key on the door, the names atr all right, and i have done this like 10 times before unlocking other stuff, but for some reason the door doesnt wantto unlock... ill tell you what my map is..
My guy goes through the first map and at the end, there are 2 doors, one is the study and one is upstairs, (both level doors), the upstairs door is locked but the study door isnt,. so you have to go through the study door to the second map to get the key for the upstairs door. but when i get the key and come back to the first map, the key doesnt unlock the upstairs door to the third map... lol get it?
soo
Map 1 > Map 2 > Map 1 > Map 3.
iuno how to explain it any other way
(This post was last modified: 04-06-2011, 06:44 AM by Itskody.)
|
|
04-06-2011, 06:43 AM |
|
Russ Money
Senior Member
Posts: 360
Threads: 25
Joined: Dec 2010
Reputation:
4
|
RE: lock door help
Yeah, I understand what you mean. Are you sure the doors are named correctly and match in your script? Because I notice that in your script, after you unlock door_2, it triggers a: SetLevelDoorLockedText("door_2", "Levels", "Upstairs");
|
|
04-06-2011, 06:48 AM |
|
Itskody
Member
Posts: 100
Threads: 30
Joined: Mar 2011
Reputation:
1
|
RE: lock door help
(04-06-2011, 06:48 AM)Russ Money Wrote: Yeah, I understand what you mean. Are you sure the doors are named correctly and match in your script? Because I notice that in your script, after you unlock door_2, it triggers a: SetLevelDoorLockedText("door_2", "Levels", "Upstairs");
yes im sure, and that doesnt matter the order, all 4 of those happens at the same time, and only when the door is locked it will show that text. butt. ill delete that part and try it without it
Nope it doesnt matter, still says its lock. lol
wait would it work if i put the
AddUseItemCallback("", "key_tower_1", "door_2", "UsedKeyUpstairs", true);
to void OnEnter? ill try that
yep that fixed itt
(This post was last modified: 04-06-2011, 07:09 AM by Itskody.)
|
|
04-06-2011, 06:55 AM |
|
Russ Money
Senior Member
Posts: 360
Threads: 25
Joined: Dec 2010
Reputation:
4
|
RE: lock door help
Strange that fixed it, but okay! Good deal.
|
|
04-06-2011, 07:22 AM |
|
|