Creating a Checkpoint. - 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: Creating a Checkpoint. (/thread-10354.html) |
Creating a Checkpoint. - Angerpull - 09-16-2011 I've tried everything and I just gave up. I need some help here to create my checkpoint, a brief explanation or so on how to do it. Anyone? Please? -Angerpull RE: Creating a Checkpoint. - Khyrpa - 09-16-2011 CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry); 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 Those should tell everything. If you have something you particulary dont know about or anything just come to the IRC and I can try and help in more depth RE: Creating a Checkpoint. - Angerpull - 09-16-2011 (09-16-2011, 05:56 PM)Khyrpa Wrote: CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);Well I was hoping for a brief explanation on how to do it, not a copy/paste treatment. For instance: The function to call when the player dies/respawns Tells me nothing. I have no idea what that means. RE: Creating a Checkpoint. - Khyrpa - 09-16-2011 (09-16-2011, 06:12 PM)Angerpull Wrote: Well I was hoping for a brief explanation on how to do it, not a copy/paste treatment. For instance: The function to call when the player dies/respawns Tells me nothing. I have no idea what that means.So to do a simple checkpoint. Just decide when you want to set the checkpoint. For instance: after a callback that triggers a monster. When you want to do that, just place the checkpoint inside the same brackets the monster spawn is. This is as how simple this func can be to create a checkpoint: CheckPoint ("", "NameOfThePlayerStartAreaHere", "", "", ""); So now that checkpoint function only spawns you into that StartArea after you come back from the black screen with text, it should repeat the process when you die again but I'm not really sure about that. Then about the string& asCallback Callback in particular could be explained like this:I assume youre familiar with Simple timer functions AddTimer("", 1, "CallbackName"); void CallbackName(string &in asTimer) {somethinghappens} Its pretty much the exact same thing with the checkpoint function as well. Like this: CheckPoint ("", "NameOfThePlayerStartAreaHere", "CallbackName", "", ""); void CallbackName(string &in asName, int alCount) {somethinghappens} All you have to change is the string &in asTimer to string &in asName, int alCount, those are told in the script functions page. This means you could use the checkpoint to make something happen after the player dies i.e. respawn a monster. As for string& asDeathHintCatand string& asDeathHintEntry those only change the text that appears in the black screen after you die. They could be left blank and that would create the default text or you could create entry inside your lang file to set custom text. It works like SetMessage function. PS. I could have explained these things easier in IRC (just press the IRC in the top right corner of this forum), I'm idling there quite often and if you have more questions please come to IRC? |