Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
lock door help
Itskody Offline
Member

Posts: 100
Threads: 30
Joined: Mar 2011
Reputation: 1
#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..
PHP Code: (Select All)
void OnStart()
{
    
AddUseItemCallback("""key_tower_1""door_2""UsedKeyUpstairs"true);
}

void UsedKeyUpstairs(string &in asItemstring &in asEntity)
{
    
SetLevelDoorLocked("door_2",false);
    
PlaySoundAtEntity("""unlock_door""door_2"0false);
    
RemoveItem("key_tower_1");
    
SetLevelDoorLockedText("door_2""Levels""Upstairs");

Is something wrong here?
04-06-2011, 06:27 AM
Find
Russ Money Offline
Senior Member

Posts: 360
Threads: 25
Joined: Dec 2010
Reputation: 4
#2
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..
PHP Code: (Select All)
void OnStart()
{
    
AddUseItemCallback("""key_tower_1""door_2""UsedKeyUpstairs"true);
}

void UsedKeyUpstairs(string &in asItemstring &in asEntity)
{
    
SetLevelDoorLocked("door_2",false);
    
PlaySoundAtEntity("""unlock_door""door_2"0false);
    
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
Find
Itskody Offline
Member

Posts: 100
Threads: 30
Joined: Mar 2011
Reputation: 1
#3
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..
PHP Code: (Select All)
void OnStart()
{
    
AddUseItemCallback("""key_tower_1""door_2""UsedKeyUpstairs"true);
}

void UsedKeyUpstairs(string &in asItemstring &in asEntity)
{
    
SetLevelDoorLocked("door_2",false);
    
PlaySoundAtEntity("""unlock_door""door_2"0false);
    
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
Find
Russ Money Offline
Senior Member

Posts: 360
Threads: 25
Joined: Dec 2010
Reputation: 4
#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
Find
Itskody Offline
Member

Posts: 100
Threads: 30
Joined: Mar 2011
Reputation: 1
#5
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
Find
Russ Money Offline
Senior Member

Posts: 360
Threads: 25
Joined: Dec 2010
Reputation: 4
#6
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
Find
Itskody Offline
Member

Posts: 100
Threads: 30
Joined: Mar 2011
Reputation: 1
#7
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
Find
Russ Money Offline
Senior Member

Posts: 360
Threads: 25
Joined: Dec 2010
Reputation: 4
#8
RE: lock door help

Strange that fixed it, but okay! Good deal.

04-06-2011, 07:22 AM
Find




Users browsing this thread: 1 Guest(s)