[SCRIPT] Need some help restarting map! - 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] Need some help restarting map! (/thread-20855.html) |
Need some help restarting map! - TexMex - 03-22-2013 Hey, I need some help with my story, or the scripting for my story. The problem is that i need the map to restart when the player dies but i cant figure out how to do this, i tried to put a checkpoint in the beginning of the story but then the player already had the knife (after he died) that was supposed to teleport him when he picked it up. So do anyone know how to restart the map when the player dies? Thanks for all help RE: Need some help restarting map! - Wapez - 03-22-2013 I'd say you end the story completely, and the Player has to restart it the same way they did the first time they started it. PHP Code: void StartCredits(string& asMusic, bool abLoopMusic, string& asTextCat, string& asTextEntry, int alEndNum); http://wiki.frictionalgames.com/hpl2/amnesia/script_functions RE: Need some help restarting map! - ingedoom - 03-23-2013 (03-22-2013, 09:14 PM)TexMex Wrote: Hey, I need some help with my story, or the scripting for my story. The problem is that i need the map to restart when the player dies but i cant figure out how to do this, i tried to put a checkpoint in the beginning of the story but then the player already had the knife (after he died) that was supposed to teleport him when he picked it up. I don't know how exactly your story evolves, but you need some trigger to restart the story. For example a collide callback, that will make the script restart. If you can follow me? Any trigger will do. There is no function like Restart(), you have to use the engine script to reset it all as it was at the beginning. It all depends on what your story's content is. RE: Need some help restarting map! - TexMex - 03-23-2013 Hey, i wont end my story completely because then the player will start from the beginning of the story and not just the map, right? How do i use the engine script to reset it all? And is it any function that makes me decide what happens when the player die? Then i could make him change to the same map. Thanks for all reply RE: Need some help restarting map! - Wapez - 03-23-2013 Okay, I'll help you out. Send me your map to my email and I'll see what I can do. wapez@frunkenproductions.com |