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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Level Editor Help Level Doors
ZIEGMEBALLEN Offline
Junior Member

Posts: 18
Threads: 4
Joined: Feb 2014
Reputation: 1
#1
Level Doors

I just can't seem to unlock go to other levels but the map file for the next level is correct and the start position is correct look:
Text Entry :
LevelDoor1
StartPosition :
PlayerStartArea_1
Map File:
02_Hall.map
Locked :
Checked
LockedTextCat:
Levels
LockedTextEntry:
LevelDoor1

I created a key at my Cs but when i unlock it, and click my level door, nothing happens...
Extra lang file
<LANGUAGE>
<RESOURCES>
</RESOURCES>
<CATEGORY Name = "CustomStoryMain">
<Entry Name = "Description">You Are a guy who's working as a Janitor in A Mansion Where you woke up alone at 6:30 AM. You discovered that there are monster inside and they don't want you to leave the Mansion. Find A Way to Leave the House without dying.</Entry>

</CATEGORY>
<CATEGORY Name = "Inventory">
<Entry Name = "ItemName_SecondRoomKey_1">Key</Entry>
<Entry Name = "ItemDesc_SecondRoomKey_1">Key</Entry>
<Entry Name = "ItemName_HallKey_1">Hall Key</Entry>
<Entry Name = "ItemDesc_HallKey_1">Key to the Hall</Entry>

</CATEGORY>

<CATEGORY Name = "Levels">
<Entry Name = "LevelName_LevelDoor1">To Hall</Entry>
<Entry Name = "LevelText_LevelDoor1">To the Main Hall</Entry>

</CATEGORY>

<CATEGORY Name="Journal">
<Entry Name="Note_A1_Name">Discovering</Entry>
<Entry Name="Note_A1_Text">I Woke up at 6:30 where i discovered that i'm alone.[br][br]I Need to Get out of the house, but... [br][br] I Also discovered something...There...Are....Monsters inside. I Need To Leave now and Get help as i am going to die in this house.. [br][br]Is this my last momment ?</Entry>

</CATEGORY>
</LANGUAGE>

My map hps:

void OnStart()
{
AddEntityCollideCallback("Player", "Script_1", "Teleport1", true, 1);
AddUseItemCallback("", "SecondRoomKey_1", "SecondRoom_1", "UsedKeyOnDoor", true);
AddUseItemCallback("", "HallKey_1", "LevelDoor1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("SecondRoom_1", false, true);
SetSwingDoorLocked("LevelDoor1", false, true);
PlaySoundAtEntity("", "unlock_door", "SecondRoom_1", 0, false);
PlaySoundAtEntity("", "unlock_door", "LevelDoor1", 0, false);
RemoveItem("SecondRoomKey_1");
RemoveItem("HallKey_1");
}

void Teleport1(string &in asParent, string &in asChild, int alStates)
{
SetEntityActive("TeleportingNG_1", true);
PlaySoundAtEntity("", "24_iron_maiden.snt", "TeleportingNG_1", 0, false);
AddPropForce("TeleportingNG_1", -10000, 0, 0, "Player");
}
Please help and i will +rep on anyone who can help me
(This post was last modified: 03-28-2014, 09:43 AM by ZIEGMEBALLEN.)
03-28-2014, 09:42 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: Level Doors

When unlocking level doors, you must use the script SetLevelDoorLocked instead of SetSwingDoorLocked. They work a bit differently.
PHP Code: (Select All)
SetLevelDoorLocked(stringasNamebool abLocked); 

(This post was last modified: 03-28-2014, 09:54 AM by Mudbill.)
03-28-2014, 09:54 AM
Find
ZIEGMEBALLEN Offline
Junior Member

Posts: 18
Threads: 4
Joined: Feb 2014
Reputation: 1
#3
RE: Level Doors

(03-28-2014, 09:54 AM)Mudbill Wrote: When unlocking level doors, you must use the script SetLevelDoorLocked instead of SetSwingDoorLocked. They work a bit differently.
PHP Code: (Select All)
SetLevelDoorLocked(stringasNamebool abLocked); 

It didn't work it got errored, it says could not load script file..
03-28-2014, 09:59 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#4
RE: Level Doors

That's probably because you just renamed it, and didn't remove the last boolean parameter. This one only has 2 parameters, whereas the swing door has 3.

Remove the last true part.

03-28-2014, 10:00 AM
Find
ZIEGMEBALLEN Offline
Junior Member

Posts: 18
Threads: 4
Joined: Feb 2014
Reputation: 1
#5
RE: Level Doors

(03-28-2014, 10:00 AM)Mudbill Wrote: That's probably because you just renamed it, and didn't remove the last boolean parameter. This one only has 2 parameters, whereas the swing door has 3.

Remove the last true part.

Okay i removed the true part now, now it looks like this:
SetLevelDoorLocked("LevelDoor1", false,);
But it didn't worked
03-28-2014, 10:03 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#6
RE: Level Doors

You must also remove the comma. That's part of the syntax.

03-28-2014, 10:05 AM
Find
ZIEGMEBALLEN Offline
Junior Member

Posts: 18
Threads: 4
Joined: Feb 2014
Reputation: 1
#7
RE: Level Doors

(03-28-2014, 10:05 AM)Mudbill Wrote: You must also remove the comma. That's part of the syntax.

Thanks, it worked but the key is no longer usefull it is unlocked automatically why is that?
03-28-2014, 10:08 AM
Find




Users browsing this thread: 3 Guest(s)