Frictional Games Forum (read-only)
how to make a door load another map ? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: how to make a door load another map ? (/thread-7055.html)



how to make a door load another map ? - Crypto - 03-25-2011

Hi i need help little bit. how can i make door load second map when i have completed the first mapHuh.


RE: how to make a door load another map ? - Viperdream - 03-25-2011

Use a LevelDoor.

Or

Code:
ChangeMap(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound);



RE: how to make a door load another map ? - Crypto - 03-26-2011

It gave me an error
: FATAL ERROR: Could not load script file 'custom_stories/maps/custom_stories/maps/maps/MansionEscape.hps'!
Main(24,1) : ERR : Unexpected token '{'

here is the script:
////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "key_tomb_1", "castle_2", "KeyOnDoor", true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_2", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "castle_2", 0.0f, true);
}
void OnStart()
{
AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1" , true , 1);
}
void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("servant_grunt_1" , true);
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_1",0,"");
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_12",0,"");
}

{
ChangeMap(string& asMansionEscapeTwo, string& asStartPos, string& asStartSound, string& asEndSound);
}


RE: how to make a door load another map ? - Pandemoneus - 03-26-2011

Read this please:
http://wiki.frictionalgames.com/hpl2/tutorials/script/entihscript_beginner


RE: how to make a door load another map ? - Crypto - 03-26-2011

ok but can someone just tell what is wrong with that script ?


RE: how to make a door load another map ? - Tanshaydar - 03-26-2011

Even if someone tell it, you still have to see the tutorials.


RE: how to make a door load another map ? - MrBigzy - 03-26-2011

Your bottom part isn't in a function. You gotta look at the error message. When it says 24, 1, that means line 24, character 1.


RE: how to make a door load another map ? - Crypto - 03-26-2011

it works now ! thanks everyone