Frictional Games Forum (read-only)
[SCRIPT] Load autosave on 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: [SCRIPT] Load autosave on death? (/thread-18428.html)



Load autosave on death? - Chronogyros - 09-20-2012

I don't like how when the player dies, you just respawn and go along your way as if nothing happened. Is there a way to load an autosave when player dies, this way he/she has to re-do the part where they died?

I tried messing with checkpoints, but that only spawns a player in a certain spot after death.

Any ideas?


RE: Load autosave on death? - Your Computer - 09-20-2012

If you tried the checkpoint and all it does is spawn the player on a certain spot, then you didn't make use of the callback to reset the stage.


RE: Load autosave on death? - Chronogyros - 09-20-2012

Correct. Right now my callback is empty because I'm not sure what to put in there that will reset the stage.

The hard way, off the top of my head, would probably be to use resetprop, remove items, setplayer heath, etc etc...

Any ideas on an easier approach?


RE: Load autosave on death? - Robby - 09-20-2012

^

I don't think so. There's no "load auto save" function there, if I think correctly.


RE: Load autosave on death? - crisosphinx - 09-21-2012

From what I recall, and I'm not a programmer, HPL2 Engine doesn't support autosave. However, you can mimic this by setting a call back for the checkpoint. If you wish not to use a callback & checkpoint at all, you could spend a ton of time investing research (mostly you trying to make an autosave or some type of thing that like) into creating an autosave system or a specific "user-made" callback system that works as an autosave feature, which, if you're not a full-time programmer, may cause you a ton of trouble.

Aside from that, if I recall, the reason they did the checkpoints was merely as a way to not only punish the player for dying, but clear errors that may have developed AND provide a do-over for the section of the game the player was having trouble with (hopefully to scare them again).


RE: Load autosave on death? - Vic7im - 09-23-2012

I have an idea.

What if you make a script where "if" the player's health gets ≤ 1 or 2 he "dies" aka gets teleported in another level, the "loading room". There he simply opens a level door which will teleport him back to the level he died.