teleporting at death - 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: teleporting at death (/thread-14526.html) |
teleporting at death - zombiehacker595 - 04-06-2012 what would i have to do to teleport the player to a different map after death RE: teleporting at death - Mackiiboy - 04-06-2012 (04-06-2012, 08:52 AM)zombiehacker595 Wrote: what would i have to do to teleport the player to a different map after death. You can set up a checkpoint that calls a function when you die. Put in a mapchange into that function. void CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry); Sets a checkpoint at which the player will respawn in case he dies. Callback syntax: void MyFunc(string &in asName, int alCount) Count is 0 on the first checkpoint load! asName - the internal name asStartPos - the name of the StartPos in the editor asCallback - the function to call when the player dies/respawns asDeathHintCat - the category of the death hint message to be used in the .lang file asDeathHintEntry - the entry in the .lang file AND 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 |