![]() |
custom story help? - 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: custom story help? (/thread-16264.html) |
custom story help? - peepeeboynotreal - 06-18-2012 i'm woking on a custom story and i've ran into to problems to do with the map exiting doors 1: if its locked and needs to be opened with a key. the key dissapears but the door is still locked 2:when its not locked and i try opening it i get a fatal error thats says "ERR: no matching signatures to 'OnLeave()' main(4,1):ERR: expected'{'." i have no 'OnLeave()' in my HPS help please? RE: custom story help? - Dutton - 06-18-2012 post your script RE: custom story help? - peepeeboynotreal - 06-18-2012 (06-18-2012, 07:59 AM)Dutton Wrote: post your scriptvoid OnStart() { AutoSave(); AddUseItemCallback("", "hubkey1", "hubdoor1", "hubunlock", true); } void hubunlock(string &in asItem, string &in asEntity) { SetSwingDoorLocked("hubdoor1", false, true); PlaySoundAtEntity("", "unlock_door", "hubdoor1", 0, false); RemoveItem("hubkey1"); } tell me if there a prob RE: custom story help? - Dutton - 06-18-2012 There seems to be no error in your script. Did you name your key and door exactly the same as in the script? RE: custom story help? - peepeeboynotreal - 06-18-2012 (06-18-2012, 08:44 AM)Dutton Wrote: There seems to be no error in your script.yeah RE: custom story help? - Dutton - 06-18-2012 Did you post the whole script in your hps file? Try putting in: Code: void OnLeave() Try deleting your map_cache file. RE: custom story help? - peepeeboynotreal - 06-18-2012 (06-18-2012, 08:54 AM)Dutton Wrote: Did you post the whole script in your hps file?now it just says "expected '{' should i try a new door? or have a new key? RE: custom story help? - Datguy5 - 06-18-2012 void OnStart() { AutoSave(); AddUseItemCallback("", "hubkey1", "hubdoor1", "hubunlock", true); } void hubunlock(string &in asItem, string &in asEntity) { SetSwingDoorLocked("hubdoor1", false, true); PlaySoundAtEntity("", "unlock_door", "hubdoor1", 0, false); RemoveItem("hubkey1"); } //////////////////////////// // Run when entering map void OnEnter() { } //////////////////////////// // Run when leaving map void OnLeave() { } Try dat |