[SCRIPT] Credits After 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] Credits After Death (/thread-19966.html) Pages:
1
2
|
Credits After Death - AGP - 01-18-2013 So... I would like to end my mod with the player dying, but before the player dies, music is activated. How would one go about scripting for credits to play with the audio continuing? Also (not of importance, but curious to know), when the player dies while the audio is still running, it runs down and distorts, then pops back up again in the same fashion when the level reloads. Is there a way to keep that effect going into the credits? Sorry if this seems like a awkward question, and I haven't done any scripting for it yet as I've no idea how to even go about this. I thank you all in advance for any bit help. =) RE: Credits After Death - NaxEla - 01-18-2013 This thread might help you out: http://www.frictionalgames.com/forum/thread-19840.html Remember to search before posting a thread RE: Credits After Death - AGP - 01-18-2013 (01-18-2013, 06:57 AM)NaxEla Wrote: This thread might help you out: http://www.frictionalgames.com/forum/thread-19840.html I looked it through. It doesn't really tell me anything that I'm looking for, except putting together the credits.... Sort of. The idea is for the player to jump into a hole, they hit bottom, and end. Do I need to add a checkpoint to the script area of where the music is activated (since the audio starts upon jumping into the hole)? RE: Credits After Death - FlawlessHappiness - 01-18-2013 What you do is, create a checkpoint. The checkpoint is where the player will spawn after death. The checkpoint has a function to call when the player dies. In this function you put the credits. To make it look good, you might also want to spawn the player somewhere, where it's all black. RE: Credits After Death - AGP - 01-18-2013 (01-18-2013, 08:03 AM)BeeKayK Wrote: What you do is, create a checkpoint. This may sound silly (noob here), how do you create a check point? RE: Credits After Death - Linus Ă…gren - 01-18-2013 Code: void CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry); Check the Engine Scripts. RE: Credits After Death - AGP - 01-18-2013 (01-18-2013, 08:50 AM)junkfood2121 Wrote: Thanks! I shall test this out! =D So these are the scripts I've got in the .hps file. In the on start section: Code: AddEntityCollideCallback("Player", "PlayerStartArea_2", "EndCheckpoint", true, 1); And on their own: Code: void EndCheckpoint(string &in asParent, string &in asChild, int alState) When I reach the point where the player should die, it respawns at the PlayStartArea_1. Are there any errors in here that I'm not seeing? RE: Credits After Death - The chaser - 01-18-2013 Yea well, you have the names wrong. RE: Credits After Death - FlawlessHappiness - 01-18-2013 AddEntityCollideCallback("Player", "PlayerStartArea_2", "EndCheckpoint", true, 1); This is the area you collide with for the function to work. Not the area you start at. CheckPoint ("", "PlayerStartArea_2", "EndGame", "Ending", "Credits"); These two are the category and entry for the deathhints. Not the credits RE: Credits After Death - AGP - 01-18-2013 I'm not quite sure what to fix. The callback got moved to the On Enter section. If this helps out more, here's the .hps file: Code: void OnStart () |