Message pop-up with script area collution - 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: Message pop-up with script area collution (/thread-18703.html) |
Message pop-up with script area collution - naseem142 - 10-09-2012 I'v made a message to pop-up , but the message doesn't pop-up when i "collide" with the script area. Please tell me where was i wrong. Code: void OnStart() { AddUseItemCallback("", "key_1", "locked_door1", "UsedKeyOnDoor", true); AddEntityCollideCallback("Player", "explode_scare", "Explode", true, 1); SetEntityCallbackFunc("key_1", "OnPickup"); AddEntityCollideCallback("Player", "Message_1", "Message1", true, 1); } void UsedKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("locked_door1", false, true); PlaySoundAtEntity("", "unlock_door.snt", "locked_door1", 0, false); RemoveItem("key_1"); } void OnPickup(string &in asEntity, string &in type) { SetEntityActive("servant_grunt_1", true); AddTimer("", 15.0f, "GruntDisable"); ShowEnemyPlayerPosition("servant_grunt_1"); } void GruntDisable(string &in asTimer) { SetEntityActive("servant_grunt_1", false); } void DoorLockedPlayer(string &in entity) { if(GetSwingDoorLocked("gruntdoorss") == true) { SetMessage("Messages", "gruntdoor", 2); } } ////////////////////////////////////////////////////////////////// void OnEnter() { AddUseItemCallback("", "trap", "locked_door1", "Trapitup", true); SetEntityCallbackFunc("trap", "OnPickup1"); } void Trapitup(string &in asItem, string &in asEntity) { SetSwingDoorLocked("locked_door1", false, true); PlaySoundAtEntity("", "unlock_door.snt", "locked_door1", 0, false); RemoveItem("trap"); } void OnPickup1(string &in asEntity, string &in type) { SetEntityActive("1", true); ShowEnemyPlayerPosition("1"); SetEntityActive("2", true); ShowEnemyPlayerPosition("2"); SetEntityActive("3", true); ShowEnemyPlayerPosition("3"); SetEntityActive("4", true); ShowEnemyPlayerPosition("4"); SetEntityActive("5", true); ShowEnemyPlayerPosition("5"); } void Message1(string &in asChild, string &in asParent, int alState) { SetMessage("Messages", "Popup1", 0); } //////////////////////////////////////////////////////////////////////////////////// void Explode(string &in asParent, string &in asChild, int alState) { SetPropHealth("vase_1", 0); SetPropHealth("vase_2", 0); } ////////////////////////////////////////////////////////////////////////////////////// RE: Message pop-up with script area collution - Adny - 10-09-2012 Everything in this script looks okay (aside from the obscure spacing in functions). Can you post your extra_english.lang file? RE: Message pop-up with script area collution - naseem142 - 10-09-2012 (10-09-2012, 05:19 PM)andyrockin123 Wrote: Everything in this script looks okay (aside from the obscure spacing in functions). Can you post your extra_english.lang file? <LANGUAGE> <CATEGORY Name="CustomStoryMain"> <Entry Name="Description">Testing out my game</Entry> </CATEGORY> <CATEGORY Name="LoadingText"> <Entry Name="Loading ..... LOL!"> </Entry> <CATEGORY Name="Sign"> </CATEGORY> <CATEGORY Name="Levels"> <Entry Name="draussen">Outside</Entry> </CATEGORY> <CATEGORY Name="verschlossen"> </CATEGORY> <CATEGORY Name="Flashbacks"> </CATEGORY> <CATEGORY Name="Ending"> <Entry Name="end"> Made by naseem [br] Special Thanks [br] me [br] Thank you for Playing my Story [br] </Entry> </CATEGORY> //////////////////////////////////////////////////////////////////////////////////// <CATEGORY Name="Guardmsg"> <Entry Name="Description">Description</Entry> </CATEGORY> <CATEGORY Name="Inventory"> </CATEGORY> <CATEGORY Name="Messages"> <Entry Name="Popup1">I must get the keys without waking him up ...</Entry> </CATEGORY> <CATEGORY Name="Descriptions"> </CATEGORY> <CATEGORY Name="Levels"> </CATEGORY> </LANGUAGE> RE: Message pop-up with script area collution - FlawlessHappiness - 10-09-2012 You have a lot of unfilled categories... try deleting them. RE: Message pop-up with script area collution - Adny - 10-09-2012 The lang file had a few errors (some known to crash/not work, others minor that should still be fixed). The issues are bolded in the lang file: Spoiler below!
Be sure to erase your original lang, copy/paste this in, and delete all of the bolded text. Hope that helped! RE: Message pop-up with script area collution - naseem142 - 10-09-2012 (10-09-2012, 05:35 PM)andyrockin123 Wrote: The lang file had a few errors (some known to crash/not work, others minor that should still be fixed). The issues are bolded in the lang file: Thank you By the way , do you know how do i make a door that leads to the next map? I don't want to create another thread. RE: Message pop-up with script area collution - Adny - 10-09-2012 (10-09-2012, 05:43 PM)naseem142 Wrote: By the way , do you know how do i make a door that leads to the next map?Entities>Doors -- in there are a few doors with the prefix "level" (i.e. level_cellar, level_cistern, etc.) These doors have options under their second tab that allows you to put in information so you can change levels. The bare minimum is the map file of the next level (which I think you browse for in the level editor). There are additional options such as making a name for the door (which requires a lang entry) and what sounds are made when you leave/enter. Good luck :3 RE: Message pop-up with script area collution - Robby - 10-09-2012 You use a "Level_door" from the entities tab. Select the "door" tab in there, and look for doors that have "level_" in their name. That, unless I remember incorrectly. Ninja'd. RE: Message pop-up with script area collution - naseem142 - 10-09-2012 (10-09-2012, 05:49 PM)andyrockin123 Wrote:(10-09-2012, 05:43 PM)naseem142 Wrote: By the way , do you know how do i make a door that leads to the next map?Entities>Doors -- in there are a few doors with the prefix "level" (i.e. level_cellar, level_cistern, etc.) These doors have options under their second tab that allows you to put in information so you can change levels. Thank you x3 |