Frictional Games Forum (read-only)

Full Version: It's still locked, Even I used a key...[SOLVED]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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

Code:
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()
{
}
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.
Did you position the door properly? Sometimes there are conflicts between the door and the door frame that prevents the door from opening.
(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
Make sure that in map editor name is EXACTLY same as in script (capital letters and lowercases, etc)
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/

(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
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 :/?
(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
hmm, he sometimes does bugs like those