Frictional Games Forum (read-only)

Full Version: totally clueless
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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/amn..._functions and Ctrl+F
(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/amn..._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?
Nope it's supposed to be inside the map you want to change from.

Btw why don't you just use a level door?
(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
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
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