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


Thread Rating:
  • 2 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
It's still locked, Even I used a key...[SOLVED]
waqas12346 Offline
Senior Member

Posts: 352
Threads: 38
Joined: Nov 2010
Reputation: 1
#1
Sad  It's still locked, Even I used a key...[SOLVED]

Ok, I am standing infront of the door, I have a key, I used a key now, Now I heard a Unlocked door sound, Checked my inventory and key is not there anymore because I used it, I'm about to open the door. Now I heard a Locked sound, WHY THE DOOR IS STILL LOCKED??? I even used a key on it!!! What is wrong with this script? Angry

void OnStart()
{
AddUseItemCallback("", "Fluffy_Key", "Fluffy_Door", "KeyOnDoor", true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("Fluffy_Door", false, true);
    PlaySoundAtEntity("", "unlock_door.snt", "Fluffy_Door", 0.0f, true);
}

void OnEnter()
{
}

void OnLeave()
{
}
(This post was last modified: 08-30-2011, 05:34 AM by waqas12346.)
08-29-2011, 10:25 PM
Website Find
Rapture Offline
Posting Freak

Posts: 1,078
Threads: 79
Joined: May 2011
Reputation: 30
#2
RE: It's still locked, Even I used a key...

Is the door a swing door or a level door? That makes a difference.

Swing door = Opens & closes
Level Door = Does not open, only goes to another map.
(This post was last modified: 08-29-2011, 10:57 PM by Rapture.)
08-29-2011, 10:57 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#3
RE: It's still locked, Even I used a key...

Did you position the door properly? Sometimes there are conflicts between the door and the door frame that prevents the door from opening.

Tutorials: From Noob to Pro
08-29-2011, 11:01 PM
Website Find
waqas12346 Offline
Senior Member

Posts: 352
Threads: 38
Joined: Nov 2010
Reputation: 1
#4
RE: It's still locked, Even I used a key...

(08-29-2011, 10:57 PM)Rapture Wrote: Is the door a swing door or a level door? That makes a difference.

Swing door = Opens & closes
Level Door = Does not open, only goes to another map.

It is a Swing Door! (Mansion door)


(08-29-2011, 11:01 PM)Your Computer Wrote: Did you position the door properly? Sometimes there are conflicts between the door and the door frame that prevents the door from opening.

Yes, The position is correct.... Is there anything wrong with the script?Confused
(This post was last modified: 08-29-2011, 11:30 PM by waqas12346.)
08-29-2011, 11:30 PM
Website Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#5
RE: It's still locked, Even I used a key...

Make sure that in map editor name is EXACTLY same as in script (capital letters and lowercases, etc)

The Interrogation
Chapter 1

My tutorials
08-29-2011, 11:43 PM
Find
DRedshot Offline
Senior Member

Posts: 374
Threads: 23
Joined: Jun 2011
Reputation: 11
#6
RE: It's still locked, Even I used a key...

There is nothing wrong with the script, otherwise "PlaySoundAtEntity" wouldn't even run.
the only possible error is in "SetSwingDoorLocked("Fluffy_Door", false, true);"
Try Deleting the .map_CACHE file from custom_stories/mystory/maps/


(This post was last modified: 08-30-2011, 12:00 AM by DRedshot.)
08-29-2011, 11:58 PM
Find
waqas12346 Offline
Senior Member

Posts: 352
Threads: 38
Joined: Nov 2010
Reputation: 1
#7
RE: It's still locked, Even I used a key...

(08-29-2011, 11:58 PM)DRedshot Wrote: There is nothing wrong with the script, otherwise "PlaySoundAtEntity" wouldn't even run.
the only possible error is in "SetSwingDoorLocked("Fluffy_Door", false, true);"
Try Deleting the .map_CACHE file from custom_stories/mystory/maps/

Is there something wrong with the word "Fluffy"? Big Grin Tongue
(08-29-2011, 11:43 PM)Elven Wrote: Make sure that in map editor name is EXACTLY same as in script (capital letters and lowercases, etc)

Everything is correct, Guess script hate Word "Fluffy"! Sad
(This post was last modified: 08-30-2011, 12:08 AM by waqas12346.)
08-30-2011, 12:07 AM
Website Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#8
RE: It's still locked, Even I used a key...

Hmm, as I said try to put exact one just in case into both. Maybe remove upper cases from both names and make it just fluffy_door or fluffydoor :/?

The Interrogation
Chapter 1

My tutorials
08-30-2011, 12:10 AM
Find
waqas12346 Offline
Senior Member

Posts: 352
Threads: 38
Joined: Nov 2010
Reputation: 1
#9
RE: It's still locked, Even I used a key...

(08-30-2011, 12:10 AM)Elven Wrote: Hmm, as I said try to put exact one just in case into both. Maybe remove upper cases from both names and make it just fluffy_door or fluffydoor :/?

I changed it to "Monster_Door" and it works, Guess Amnesia or it's scripting function doesn't allow Word "Fluffy"? Big Grin
08-30-2011, 05:34 AM
Website Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#10
RE: It's still locked, Even I used a key...[SOLVED]

hmm, he sometimes does bugs like those

The Interrogation
Chapter 1

My tutorials
08-30-2011, 10:33 AM
Find




Users browsing this thread: 1 Guest(s)