[SCRIPT] Checkpoints and autosave help - 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: [SCRIPT] Checkpoints and autosave help (/thread-21372.html) |
Checkpoints and autosave help - serbusfish - 05-02-2013 First of all i'm wanting to put a checkpoint in place so that if a monster kills you you respawn close by but the monster is gone. I know this is like the default thing that happens but I cant figure it out, I have a player start area in place, im just not sure what to do with this: void CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry); Do I put this in the part of the script that spawns the monster? And what would I put for the 'string& asCallback' bit? ------------------------------------------------------------------- Second question, I was just wondering how the 'void AutoSave();' command works, do I put this at the beginning of a map or the end? And if say, items have been collected, if the player exits and reloads will the game have saved this or do I need to put auto save commands in the scripts after item pickups? And do I need to assign start areas or will it just start at the place you exit at? RE: Checkpoints and autosave help - PutraenusAlivius - 05-02-2013 Create a script area at the place where the Player would be respawning and name it "ScriptAreaMonsterRespawn" without the quotation marks. After that, put an in-active enemy at the place of the original one called "EnemyInActive" without the quoatation marks. Now, copy paste the following script. PHP Code: void OnStart() And I do not know about the AutoSave thing. Just put in on the void OnEnter() part. Just put that s**t in. I'm just following FG's scripts. RE: Checkpoints and autosave help - The chaser - 05-02-2013 Ehem: Fixed: PHP Code: void OnStart() Edit: Fixed. RE: Checkpoints and autosave help - PutraenusAlivius - 05-02-2013 Right. BTW, at this code, after the closing ), there's a ; You should remove them. This is the mentioned code. PHP Code: void MonsterRespawn(string &in asParent, string &in asChild, int alState); <This one RE: Checkpoints and autosave help - serbusfish - 05-02-2013 Ah right that makes total sense now I see it written down, although I wouldn't have know to do any of that extra stuff with the script boxes Thanks guys, i'll give it a try in a bit. RE: Checkpoints and autosave help - serbusfish - 05-02-2013 Hmmm i'm confused, shouldn't 'SetEntityActive' be false so the enemy isnt there after respawn? Also i'm using alternative music when the enemy arrives, so I used the command StopMusic to stop the normal level music then play the enemy music. However as it stands now I respawn and no music is playing at all. Is there a way to activate a script area on respawn, that way I can tell it to start playing the regular level music again when you collide with it? RE: Checkpoints and autosave help - The chaser - 05-03-2013 Yes, just: PHP Code: void OnStart() RE: Checkpoints and autosave help - PutraenusAlivius - 05-03-2013 (05-03-2013, 01:18 PM)The chaser Wrote: Yes, just:Just a little bit of a fix from the chaser's script. PHP Code: void OnStart() |