![]() |
IT WORKS! yay - 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: IT WORKS! yay (/thread-14698.html) Pages:
1
2
|
IT WORKS! yay - jessehmusic - 04-11-2012 Hello i wonder how i make my daniel to die and later wake up on another map ?? any clue? RE: Player Respawn on other map - Cranky Old Man - 04-11-2012 (04-11-2012, 02:29 PM)jessehmusic Wrote: Hello i wonder how i make my daniel to die and later wake up on another map ?? any clue?This question is probably answered in these forums once every week. You can also check out how Frictional Games did it in the chancel/prison map. RE: Player Respawn on other map - jessehmusic - 04-11-2012 (04-11-2012, 02:37 PM)Cranky Old Man Wrote:they have to hard script i dont understand them :S(04-11-2012, 02:29 PM)jessehmusic Wrote: Hello i wonder how i make my daniel to die and later wake up on another map ?? any clue?This question is probably answered in these forums once every week. You can also check out how Frictional Games did it in the chancel/prison map. RE: Player Respawn on other map - Mackiiboy - 04-11-2012 (04-11-2012, 02:29 PM)jessehmusic Wrote: Hello i wonder how i make my daniel to die and later wake up on another map ?? any clue?. You can set the player's health to 0 by using: void SetPlayerHealth(float afHealth); 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 I can come up with three more possible ways to script this, but using checkpoints is probably the best way. RE: Player Respawn on other map - Stepper321 - 04-11-2012 Well, it's the script you have to use. RE: Player Respawn on other map - jessehmusic - 04-11-2012 (04-11-2012, 02:48 PM)Mackiiboy Wrote:whats the callback i should use?(04-11-2012, 02:29 PM)jessehmusic Wrote: Hello i wonder how i make my daniel to die and later wake up on another map ?? any clue?. RE: Player Respawn on other map - Mackiiboy - 04-11-2012 (04-11-2012, 02:50 PM)jessehmusic Wrote: whats the callback i should use?. Callback syntax for checkpoints: void MyFunc(string &in asName, int alCount) So you'll have to put your ChangeMap(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound); into MyFunc. RE: Player Respawn on other map - jessehmusic - 04-11-2012 (04-11-2012, 02:54 PM)Mackiiboy Wrote:So the Changemap is the callback ? getting confused ?(04-11-2012, 02:50 PM)jessehmusic Wrote: whats the callback i should use?. RE: Player Respawn on other map - Mackiiboy - 04-11-2012 (04-11-2012, 02:56 PM)jessehmusic Wrote: So the Changemap is the callback ? getting confused ?. MyFunc or whatever you are going to call it is the callback. That function should call the ChangeMap. . void CheckPoint (string& asName, string& asStartPos, string&asCallback, string& asDeathHintCat, string& asDeathHintEntry); asCallback - the function to call when the player dies/respawns So, when you die, a function will be called, lets call it MyFunc. That function has the callback syntax (string &in asName, int alCount) void MyFunc(string &in asName, int alCount) { // Put everything here that you want to happen after death ChangeMap(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound); } RE: Player Respawn on other map - jessehmusic - 04-11-2012 (04-11-2012, 03:03 PM)Mackiiboy Wrote:okey i got the changemap now but Daniel start looking in the ground and he donst stop any clue?(04-11-2012, 02:56 PM)jessehmusic Wrote: So the Changemap is the callback ? getting confused ?. |