[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
|
RE: Credits After Death - FlawlessHappiness - 01-19-2013 Let me get one thing straight then A PlayerStartArea is an area that you start at, by f.x. a checkpoint. You made it so when the player collides with this area, the function that makes the checkpoint calls. What you need to understand is, that a collide function work when Entity_1 collides with Entity_2. You are not making it a checkpoint just because you put the PlayerStartArea inside it. Instead of having this function "AddEntityCollideCallback("Player", "PlayerStartArea_2", "Checkpoint", true, 1);" inside the OnEnter, then just put "CheckPoint ("", "PlayerStartArea_2", "EndGame", "Ending", "Credits");" inside the OnEnter. But you see: "Ending", "Credits" <-- These 2 are not correct. If you look in the function Code: void CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry); Those 2 corresponds to asDeathHintCat - the category of the death hint message to be used in the .lang file asDeathHintEntry - the entry in the .lang file Which are the category for the DeathHint and the Entry for the DeathHint, which you can find in your .lang file. You cannot put the credits inside these files, just to make it call the credits. This only works with the DeathHints. Therefore you should make a deathhint category and entry inside your .lang file and put them inside the checkpoint line instead I hope you read this, and understood it. EDIT: Your checkpoint syntax is also wrong. You see this: Callback syntax: void MyFunc(string &in asName, int alCount) means that's what you should write, instead of (string &in asParent, string &in asChild, int alState) in a checkpoint function RE: Credits After Death - The chaser - 01-19-2013 I think your script has quite some mistakes, AGP... here I go, this should fix it: void OnStart () { GiveItemFromFile("lantern", "lantern.ent"); SetPlayerLampOil(50.0f); for(int i = 0;i < 3;i++) { GiveItemFromFile("potion_health", "potion_health.ent"); } for(int i = 0;i < 3;i++) { GiveItemFromFile("potion_sanity", "potion_sanity.ent"); } for(int i = 0;i < 2;i++) { GiveItemFromFile("potion_oil", "potion_oil.ent"); } for(int i = 0;i < 1;i++) { GiveItemFromFile("potion_oil_large", "potion_oil_large.ent"); } AddEntityCollideCallback("Player", "thelongfallarea", "Epicness", true, 1); } void OnEnter() { AddEntityCollideCallback("Player", "PlayerStartArea_2", "Checkpoint", true, 1); } void OnLeave() { } void Epicness(string &in asParent, string &in asChild, int alState) { PlaySoundAtEntity("Epicness", "overture.snt", "thelongfallarea", 0.5, false); } void Checkpoint(string &in asName, int alCount) { CheckPoint ("", "PlayerStartArea_2", "EndGame", "Ending", "Credits"); } void EndGame(string &in asName, int alCount) { StartCredits("EndGame", false, "Ending", "Credits", 5); } RE: Credits After Death - FlawlessHappiness - 01-19-2013 But TheChaser, why would he collide with a PlayerStartArea to start the checkpoint, when he could start the checkpoint right when entering the map? And why even use that PlayerStartArea for colliding? That seems very weird. RE: Credits After Death - AGP - 01-19-2013 Thanks BeeKayK! You've helped out a lot! It's all fixed and now all that's left for the mod is the final pieces of wall and ceiling! XD RE: Credits After Death - The chaser - 01-19-2013 (01-19-2013, 12:32 AM)BeeKayK Wrote: But TheChaser, why would he collide with a PlayerStartArea to start the checkpoint, when he could start the checkpoint right when entering the map? oz tru, silly me |