Frictional Games Forum (read-only)

Full Version: Level Doors
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i was trying to lock and unlock a level door and i got most of the things right but when i went to go use the key on the level door all it did was make the unlock sound and i didn't unlock the level door. what am i doing wrong?
Is it possible that you used SetSwingDoorLocked and not SetLevelDoorLocked?

PHP Code:
SetLevelDoorLocked(stringasNamebool abLocked); 

Also make sure the name of the door in the editor and in the script is the same.
heres my script. idk whats wrong with it.


AddUseItemCallback("", "Key", "LevelDoor", "UnlockLevel", true);
}




void UnlockLevel(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("LevelDoor", false);

PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);

RemoveItem(asItem);
}
Is your door named LevelDoor in the editor?

You could even change the code's SetLevelDoorLocked(); code to reference the asEntity variable so that it unlocks the door you defined in the AddUseItemCallback();.

PHP Code:
SetLevelDoorLocked(asEntityfalse); 
Moooving this to development support.
(03-07-2017, 02:05 PM)Traggey Wrote: [ -> ]Moooving this to development support.

i apologize if this was in the wrong place, still new to this forum :/
(03-11-2017, 11:38 PM)XeOnTricks Wrote: [ -> ]
(03-07-2017, 02:05 PM)Traggey Wrote: [ -> ]Moooving this to development support.

i apologize if this was in the wrong place, still new to this forum :/

Just so that you know, this is the section where we post all the technical issues concerining modding.