How make this script? (SOLVED) - 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: How make this script? (SOLVED) (/thread-38711.html) |
RE: How make this script? - Daemian - 02-16-2016 add a debug message to check your function. (hey guys) RE: How make this script? - Spelos - 02-16-2016 @Abihishi The second callback looks correct. If the message doesn't display, the problem won't be in the .hps file. Make sure that your extra_english.lang file contains: PHP Code: <CATEGORY Name="MessageCategory"> Since your .hps refers to it. Check for misspelling. More details: Spoiler below!
RE: How make this script? - Abihishi - 02-16-2016 void OnStart() { AddEntityCollideCallback("Player", "ScriptArea", "Scrypt1", true, 1); } void Scrypt1(string &in asParent, string &in asChild, int alState) { SetMessage("MessageCategory", "MessageEntry", 0); } In lang file: CATEGORY Name="MessageCategory"> <Entry Name="MessageEntry">My text</Entry> </CATEGORY> And not work. I no see item name, description etc. I dont know, maybe i download and play custom stories and maybe I encounter in this "simply" script. Bye RE: How make this script? - Mudbill - 02-16-2016 Does your other key script work? I'm asking because if not, then the issue might be that your script file is improperly formatted and not recognized. Though, if you received errors previously in this thread, that's probably not it. RE: How make this script? - Romulator - 02-16-2016 Is your ScriptArea in the Level Editor actually named "ScriptArea"? Whatever it is named, should match your code. RE: How make this script? - Abihishi - 02-16-2016 @Mudbill Jumpscare script and key work. @Romulator Yes, named is same, I checked this Five times RE: How make this script? - Spelos - 02-16-2016 Right... If this is your full .lang file: Spoiler below!
Then there's two main things wrong. You have to start with <LANGUAGE> and the comments need to have other syntax. This should be corrected .lang file: Spoiler below!
If the problem is still there, classic mistakes are:
RE: How make this script? - Abihishi - 02-16-2016 Ok, i repair. I make new notate and i forgot write </Entry> in end. But my script not work (this text,) but my jumpscare script work. RE: How make this script? - Spelos - 02-16-2016 I know you said you checked it about 5 times, but: You mentioned that your Area (in the Level Editor) is called "Skrypt 1". Abihishi Wrote:In game my script area is Skrypt 1, but this not work. You also have something like this in your .hps file: PHP Code: void OnStart() This in plain language means that if: Player touches an area called: ScriptArea, it will do Scrypt1 function. Are you really really sure your area is "ScriptArea" and not "Skrypt 1"? Also... I would advise you to rename the in Level Editor script Area to something more descriptive, like "CorridorArea". Changing the Area's name: Spoiler below!
If it still doesn't work: - Post your .hps content in it's FULL length and it's current state. - Add the names of all script Areas that you use in your Level Editor - Specify what it is supposed to do and what it's doing I'm really scraping the bottom of the barrel here. RE: How make this script? - Abihishi - 02-16-2016 Ok, so i change all as you said and.... WORK! God donuts, really I'm stupid. My script in editor is Script1 and this not work. I thought, that this is script named and script area named. Really thanks for you Spelos, and all guys who tried me help! Bye (to the next error : D) |