![]() |
Checkpoints - 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: Checkpoints (/thread-13752.html) Pages:
1
2
|
Checkpoints - Datguy5 - 03-04-2012 Hello people! I have made that when an player enters a area he gets killed and then he should spawn in a jail.It needs checkpoints but how would i do it?Oh and i also want that when the player starts from the jail.And is it possible to make a short intro when the player spawns in the jail?Or does that need another map or something. //////////////////////////// // Run when the map starts void OnStart() { SetPlayerHealth(10); SetPlayerSanity(40); SetPlayerActive(false); FadeIn(3.0f); MovePlayerHeadPos(0, -1.0f, 0, 13, 11); PlayMusic("amb_extra02.ogg", true, 1.0f, 1.0f, 1, false); SetPlayerCrouching(true); FadeRadialBlurTo(2.0f, 1); AddTimer("", 6, "Player"); AddTimer("", 2, "Cough"); StartPlayerLookAt("Look", 2, 4, "StopPlayerLookAt"); PlaySoundAtEntity("", "player_cough.snt", "Player", 0, false); AddEntityCollideCallback("Player", "Message_1", "Message1", true, 1); AddEntityCollideCallback("Player", "Message_2", "Message2", true, 1); AddEntityCollideCallback("Player", "Message_3", "Message3", true, 1); AddEntityCollideCallback("Player", "Blood", "Message4", true, 1); AddEntityCollideCallback("Player", "Sound", "Hear", true, 1); AddEntityCollideCallback("Player", "Sound2", "Hear2", true, 1); AddEntityCollideCallback("Player", "Trap", "Omg", true, 1); AddEntityCollideCallback("Player", "Say", "Here", true, 1); SetEntityPlayerLookAtCallback("Sign_1", "Look_1", false); SetEntityPlayerLookAtCallback("Sign_2", "Look_2", false); } void Cough(string &in asTimer) { PlaySoundAtEntity("", "player_cough.snt", "Player", 0, false); SetMessage("Messages", "Message1", 4); } void Player(string &in asTimer) { PlaySoundAtEntity("", "react_sigh.snt", "Player", 0, false); SetPlayerActive(true); MovePlayerHeadPos(0, 0, 0, 10, 20); SetPlayerCrouching(false); FadeRadialBlurTo(0, 3); } void Message1(string &in asChild, string &in asParent, int alState) { SetMessage("Messages", "Popup1", 4); } void Message2(string &in asChild, string &in asParent, int alState) { SetMessage("Messages", "Popup2", 4); } void Sign_1(string &in asEntity, int alState) { SetMessage("Signs", "Sign1", 2); } void Sign_2(string &in asEntity, int alState) { SetMessage("Signs", "Sign2", 2); } void Message3(string &in asChild, string &in asParent, int alState) { SetMessage("Messages", "Popup3", 3); } void Message4(string &in asChild, string &in asParent, int alState) { SetMessage("Messages", "Popup4", 3); PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false); GiveSanityDamage(10.0f, true); } void Hear(string &in asChild, string &in asParent, int alState) { PlaySoundAtEntity("", "enabled.snt", "Player", 0, false); SetMessage("Messages", "Popup5", 3); GiveSanityDamage(10.0f, true); } void Hear2(string &in asChild, string &in asParent, int alState) { PlaySoundAtEntity("", "ambience_haunting.ogg", "Player", 0, false); } void Here(string &in asChild, string &in asParent, int alState) { SetMessage("Messages", "Popup6", 3); } void Omg(string &in asChild, string &in asParent, int alState) { SetEntityActive("Este", true); SetEntityActive("Este2", true); SetEntityActive("Este3", true); SetEntityActive("Grunt", true); ShowEnemyPlayerPosition("Grunt"); PlaySoundAtEntity("", "pickaxe_hit.snt", "Player", 0, false); SetMessage("Messages", "Popup7", 3); } //////////////////////////// // Run when entering map void OnEnter() { SetPlayerLampOil(0); } //////////////////////////// // Run when leaving map void OnLeave() { } And how do i make death hint saying something then.Here is my lang file: <LANGUAGE> <CATEGORY Name="CustomStoryMain"> <Entry Name="Description">YOUR DESCRIPTION HERE</Entry> </CATEGORY> <CATEGORY Name="Messages"> <Entry Name="Popup1">Ugh,what happened...</Entry> <Entry Name="Popup2">I should pick up that torch and try to find a way out of here.</Entry> <Entry Name="Popup3">Hmm,this place looks like an abandoned mine.</Entry> <Entry Name="Popup4">Is that blood!?</Entry> <Entry Name="Popup5">What was that!!?</Entry> <Entry Name="Popup6">This must be the right way.</Entry> <Entry Name="Popup7">Im trapped!!</Entry> </CATEGORY> <CATEGORY Name="Signs"> <Entry Name="Sign1">Storage</Entry> <Entry Name="Sign2">Equipment</Entry> </CATEGORY> <CATEGORY Name="Levels"> </CATEGORY> </LANGUAGE> RE: Checkpoints and ambient sounds - Stepper321 - 03-04-2012 I only know the ambience sound thing. Use this when he enters a script area: Quote:void PlaySoundAtEntity(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound); RE: Checkpoints and ambient sounds - Datguy5 - 03-04-2012 (03-04-2012, 05:29 PM)Stepper321 Wrote: I only know the ambience sound thing.Thank you : ) i know that script but i was kinda confused : D RE: Checkpoints and ambient sounds - Datguy5 - 03-05-2012 Help? RE: Checkpoints and ambient sounds - trollox - 03-05-2012 ambinet sonds? as for example that a sound plays as the player his the area ? if so i know , but i'm unsure of your question. As for the jail part you could set the playing inactive and make him slowly look at a targate. As your intro and for the checkpoints i don't know :C i wish i did. But i you need help with the music script / how to do it i know exacly how. Trollox. RE: Checkpoints and ambient sounds - Datguy5 - 03-05-2012 (03-05-2012, 02:55 PM)trollox Wrote: ambinet sonds? as for example that a sound plays as the player his the area ? if so i know , but i'm unsure of your question. As for the jail part you could set the playing inactive and make him slowly look at a targate. As your intro and for the checkpoints i don't know :C i wish i did. But i you need help with the music script / how to do it i know exacly how.Thanks but i solved the ambient sound thingy.And now mostly the problem is the checkpoints :/ RE: Checkpoints and ambient sounds - trollox - 03-05-2012 Well i guess you'd have to ask someone more experienced for that. I really want to know how to creat a checkpoint aswell. Tell me if you figgure out somthing. Trollox. RE: Checkpoints and ambient sounds - Datguy5 - 03-05-2012 (03-05-2012, 03:31 PM)trollox Wrote: Well i guess you'd have to ask someone more experienced for that. I really want to know how to creat a checkpoint aswell. Tell me if you figgure out somthing.Keep checking this post : D i hope someone experienced helps me :/ RE: Checkpoints - Your Computer - 03-05-2012 Checkpoints are no different than any other callback. Why do you have trouble with checkpoints when you appear to know how to set up collision and player look-at callbacks? Checkpoints get triggered when the player dies. RE: Checkpoints - Datguy5 - 03-05-2012 (03-05-2012, 06:06 PM)Your Computer Wrote: Checkpoints are no different than any other callback. Why do you have trouble with checkpoints when you appear to know how to set up collision and player look-at callbacks? Checkpoints get triggered when the player dies. Umm yes...But how about the death hint?Where do i put it in my lang file? |