Scripting - 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 (https://www.frictionalgames.com/forum/forum-35.html) +--- Thread: Scripting (/thread-4573.html) |
Scripting - darkdamp - 09-19-2010 Hi, i have a problem i have a map called awesomeness.map I took a script from the official maps that was .hps and edited it its not called awesomeness.hps I made this easy script on it //////////////////////////// // Run first time starting map void OnStart() { //Add the Lantern and 10 Tinderboxes when in Debug mode, always good to have light! if(ScriptDebugOn()) { GiveItemFromFile("lantern", "lantern.ent"); for(int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent"); } } //////////////////////////// // Run when entering map void OnEnter() { } //////////////////////////// // Run when leaving map void OnLeave() { } But! i have no lantern when i start (awesomness.map and .hps and .map_cache are on the same folder /custom_stories/Test Maps/maps Please i donĀ“t know what to do. RE: Scripting - nickTs - 09-19-2010 The .map file and .hps file need to have the same name. RE: Scripting - darkdamp - 09-19-2010 they have both has the name awesomeness EDIT: my custom story settings looks like this <Main ImgFile = "story.png" Name = "Haunted" Author = "Osukaru" MapsFolder = "maps" StartMap = "Awesomeness.map" StartPos = "" /> if it makes any difference ^^ RE: Scripting - Akasu - 09-19-2010 If you aren't running in dev-mode use this instead: void OnStart() { GiveItemFromFile("lantern", "lantern.ent"); for(int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent"); } RE: Scripting - darkdamp - 09-19-2010 thanks it worked!! EDIT: Btw, how do i know which script i should write since in not in "dev-mode" RE: Scripting - Akasu - 09-19-2010 You're welcome. Just don't include the 'if(ScriptDebugOn())' anywhere. |