Frictional Games Forum (read-only)

Full Version: Level door ain't workin' out
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
So I've made my level door and I followed a tutorial on youtube. The problem is that when I unlock the door and then press to "enter" it nothing happens.

What I've written when it comes to the door.

StartPos
PlayerStartArea_3

MapFile
Secondary.map

I've placed the PlayerStartArea_3 inside Secondary.map


Youtube video: http://www.youtube.com/watch?v=CklTIT2W4g4
(10-06-2011, 08:50 PM)i3670 Wrote: [ -> ]So I've made my level door and I followed a tutorial on youtube. The problem is that when I unlock the door and then press to "enter" it nothing happens.

What I've written when it comes to the door.

StartPos
PlayerStartArea_3

MapFile
Secondary.map

I've placed the PlayerStartArea_3 inside Secondary.map


Youtube video: http://www.youtube.com/watch?v=CklTIT2W4g4
Make sure to fill in the areas highlighted in the picture in my attachment, following your details.

No change, still won't transport me to the other map.
Guess something is wrong with your script, paste it here so we can have a look at it.
Void Onstart ()
{
AddUseItemCallback("", "Royalkey", "level_wood_1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("level_wood_1", false, true);
PlaySoundAtEntity("", "unlock_door", "level_wood_1", 0, false);
RemoveItem("Royalkey");
}

(10-09-2011, 12:40 PM)i3670 Wrote: [ -> ]Void Onstart ()
{
AddUseItemCallback("", "Royalkey", "level_wood_1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("level_wood_1", false, true);
PlaySoundAtEntity("", "unlock_door", "level_wood_1", 0, false);
RemoveItem("Royalkey");
}
Is it NOT unlocking the door? Or is it unlocking the door but NOT changing the map?

that could be helpful to figure out whats wrong.
If you want to unlock a level door, you have to use SetLevelDoorLocked() not SetSwingDoorLocked().
(10-09-2011, 06:01 PM)Your Computer Wrote: [ -> ]If you want to unlock a level door, you have to use SetLevelDoorLocked() not SetSwingDoorLocked().
Nice eye. My mind went right over that. What he said =]
Got the error message:

main (22, 3): ERR: No matching signatures to 'SetLevelDoorLocked(string@&, const bool, const bool)'



Script after change:

void OnStart()
{
AddUseItemCallback("", "Royalkey", "level_wood_1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("level_wood_1", false, true);
PlaySoundAtEntity("", "unlock_door", "level_wood_1", 0, false);
RemoveItem("Royalkey");
}
(10-09-2011, 09:51 PM)i3670 Wrote: [ -> ]Got the error message:

main (22, 3): ERR: No matching signatures to 'SetLevelDoorLocked(string@&, const bool, const bool)'

Level doors neither open nor close, so there is no "effect" to them. Therefore, only one boolean parameter is required.

http://wiki.frictionalgames.com/hpl2/amn...ions#doors
Pages: 1 2