Frictional Games Forum (read-only)
totally clueless - 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 - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: totally clueless (/thread-17323.html)



totally clueless - Soverain - 07-28-2012

alright so I have one map now, how can i create another and then have that player transition to the other when the player unlocks the door?

sorry, very new to this :x


RE: totally clueless - FlawlessHappiness - 07-29-2012

void ChangeMap(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound);
Immediatly loads another map.
asMapName - the file to load
asStartPos - the name of the StartPos on the next map
asStartSound - the sound that is played when the change starts
asEndSound - the sound that is played when the new map is loaded


Use this: http://wiki.frictionalgames.com/hpl2/amnesia/script_functions and Ctrl+F


RE: totally clueless - Soverain - 07-29-2012

(07-29-2012, 12:00 AM)beecake Wrote: void ChangeMap(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound);
Immediatly loads another map.
asMapName - the file to load
asStartPos - the name of the StartPos on the next map
asStartSound - the sound that is played when the change starts
asEndSound - the sound that is played when the new map is loaded


Use this: http://wiki.frictionalgames.com/hpl2/amnesia/script_functions and Ctrl+F
still don't quite understand how to use this. I only started about a day or so ago. Would this command go into the second .hps file for the second map?


RE: totally clueless - SilentStriker - 07-29-2012

Nope it's supposed to be inside the map you want to change from.

Btw why don't you just use a level door?


RE: totally clueless - Soverain - 07-29-2012

(07-29-2012, 12:16 AM)SilentStriker Wrote: Nope it's supposed to be inside the map you want to change from.
So it would be like this? void ChangeMap("02.map", "newarea", "", "");

how can i script the door to activate the transition? I have the level transition door but nothing happens when click it


RE: totally clueless - Mackiiboy - 07-29-2012

Basically, you do not have to script it at all. Everything can be done with the Level Editor.
Press the entitytab on your leveldoor and scroll down till' StartPos and MapFile. Write newarea in StartPos and 02.map in in the MapFilebox, and it will work.

[Image: piQTf.png]

If you want to script it, put a SetEntityPlayerInteractCallback("NameOfYourLevelDoor", "MapChangeFunc", false); inside the start function, and use this as the callback function:
void MapChangeFunc(string &in entity)
{
ChangeMap("02.map", "newarea", "", "");
}
(07-29-2012, 12:24 AM)Soverain Wrote: So it would be like this? void ChangeMap("02.map", "newarea", "", "");

how can i script the door to activate the transition? I have the level transition door but nothing happens when click it



RE: totally clueless - Soverain - 07-29-2012

haha I feel a bit silly now thank you for making that clear but now when i add the script i get an error expected "," or ";"

nevermind figured it out thank you all