Frictional Games Forum (read-only)

Full Version: Door isn't working right!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Yes, I have yet another issue. But I'm learning. So anyway, I'm completely done with the first map and is currently making the second map, but I want to connect them. I've looked at tutorials and did everything correctly, but when I go to test it out, it's still locked/ wont go to the next area! It even takes the key and makes the unlocking noise, but it wont go into the next map. If you can help me (again) please leave a reply.
Easy you need to go inside of the map editor select the door and press "entity" Once ther go to the "MapFile" and select the level you which it to lead to. Easy as that.

Trollox.
(02-01-2012, 08:17 PM)trollox Wrote: [ -> ]Easy you need to go inside of the map editor select the door and press "entity" Once ther go to the "MapFile" and select the level you which it to lead to. Easy as that.

Trollox.
I did that, but it still didn't work. Maybe I should delete and replace the door. It's worth a shot. Or maybe the selected map was in another folder since I tend to move the maps around.


Yeah most be in the same folder.
You also must select where on the map the player will start: StartPos
Ahh i see what you mean - regular doors and and level doors have a DIFFERENT type of script!
This should help you:

Code:
void OnStart()
{
AddUseItemCallback("", "KEYNAME", "LEVELDOOR", "KeyOnDoor", true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("LEVELDOOR", false);
PlaySoundAtEntity("", "unlock_door", "LEVELDOOR", 0, false);
RemoveItem("KEYNAME");
}

KEYNAME - name of your key, of course. To avoid any problems name your key without any numbers -
'Name' section and "CustomSubItemTypeName" section should also be named the same - can be different but i prefer same (its easier)
LEVELDOOR - obviously name of your door. the door does not need "CustomSubItemTypeName" as far as I know.