[SCRIPT] Teleporting-Naked-Guy 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: [SCRIPT] Teleporting-Naked-Guy Help (/thread-25611.html) |
Teleporting-Naked-Guy Help - CQBgamer - 07-05-2014 So I wanted my script to run a function that will activate and launch a corpse out of a cabinet once the player gets killed by a patrolling grunt. Once I die and enter my script area infront of the cabinet nothing happens. Code: ///////////////////////////////////////////////////////////////////////////////////////// RE: Teleporting-Naked-Guy Help - Gilligan's Hell - 07-05-2014 ... RETHINK YOUR LIFE'S DECISION. RE: Teleporting-Naked-Guy Help - CQBgamer - 07-05-2014 Okk? Fuck you too then, I thought this was a forum for help not a "Lets all crucify the guy on his first map" forum RE: Teleporting-Naked-Guy Help - The chaser - 07-05-2014 Oh, come on people, while I agree that it's a very cheap and bad jumpscare, let this guy do whatever he wants, it's his CS... I think it will be fixed with this: ///////////////////////////////////////////////////////////////////////////////////////// // On map start // void OnStart() { AddUseItemCallback("", "Storage_Room_Key", "Storage_Room_Door", "Open_Storage_Room", true); // Storage Room Key // AddEntityCollideCallback("Player", "poofer_spawn_01", "poofer_spawn_script_01", true, 1); } void poofer_spawn_script_01(string &in asParent, string &in asChild, int alState) { CheckPoint ("C1", "C1_spawn", "FunctionToCall*", "DeathHints", "Hide"); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_1", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_2", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_3", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_4", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_5", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_6", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_7", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_8", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_9", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_10", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_11", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_12", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_13", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_14", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_15", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_16", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_17", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_18", 1.000, ""); SetEntityActive("poofer_grunt_01", true); } void FunctionToCall(string &in asName, int alCount) { AddEntityCollideCallback("Player", "Teleport_Script", "Nail_That_Sucker01", true, 1); } void Open_Storage_Room(string &in asItem, string &in asEntity) { SetSwingDoorLocked("Storage_Room_Door", false, true); PlaySoundAtEntity("", "unlock_door", "Player", 0, false); RemoveItem("Storage_Room_Key"); } void Nail_That_Sucker01(string &in asParent, string &in asChild, int alState) { SetEntityActive("Naked_Guy01", true); AddPropForce("Naked_Guy01", -10000, 0, 0, "world"); PlaySoundAtEntity("", "24_iron_maiden.snt", "Naked_Guy01", 0, false); } // On Entering map // void OnEnter() { } // On Leaving map // void OnLeave() { } THIS IS THE SCRIPT, IGNORE THE PREVIOUS ///////////////////////////////////////////////////////////////////////////////////////// // On map start // void OnStart() { AddUseItemCallback("", "Storage_Room_Key", "Storage_Room_Door", "Open_Storage_Room", true); // Storage Room Key // AddEntityCollideCallback("Player", "poofer_spawn_01", "poofer_spawn_script_01", true, 1); } void poofer_spawn_script_01(string &in asParent, string &in asChild, int alState) { CheckPoint ("C1", "C1_spawn", "FunctionToCall", "DeathHints", "Hide"); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_1", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_2", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_3", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_4", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_5", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_6", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_7", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_8", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_9", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_10", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_11", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_12", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_13", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_14", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_15", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_16", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_17", 0.001, ""); AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_18", 1.000, ""); SetEntityActive("poofer_grunt_01", true); } void FunctionToCall(string &in asName, int alCount) { AddEntityCollideCallback("Player", "Teleport_Script", "Nail_That_Sucker01", true, 1); } void Open_Storage_Room(string &in asItem, string &in asEntity) { SetSwingDoorLocked("Storage_Room_Door", false, true); PlaySoundAtEntity("", "unlock_door", "Player", 0, false); RemoveItem("Storage_Room_Key"); } void Nail_That_Sucker01(string &in asParent, string &in asChild, int alState) { SetEntityActive("Naked_Guy01", true); AddPropForce("Naked_Guy01", -10000, 0, 0, "world"); PlaySoundAtEntity("", "24_iron_maiden.snt", "Naked_Guy01", 0, false); } // On Entering map // void OnEnter() { } // On Leaving map // void OnLeave() { } RE: Teleporting-Naked-Guy Help - CQBgamer - 07-05-2014 Nope, that doesnt work either ok, im trying the second one. Still doesnt work. RE: Teleporting-Naked-Guy Help - MrBehemoth - 07-05-2014 We all start somewhere, and even if you have original ideas you start by learning the tech. My first ever map was for Duke Nukem 3D and was just a big room full of strippers and tripwire bombs. That was cheap. The Trapdoor has a naked corpse in a closet. The reason: it was my first Amnesia mod/CS and I'd only ever played highly rated mods previously - I wasn't aware of the clichés. Although, he doesn't actually fly out. CQB, my advice is to make your flying naked guy and your poofers. Enjoy it, use it as a learning experience and then take what you've learned and use the knowledge to create original set pieces. RE: Teleporting-Naked-Guy Help - The chaser - 07-05-2014 I'm in my mobile so sorry if theres any typo: By what i see, the script doesnt crash, its just that the corpse doesnt spawn. Does the sound play? If it doesnt, check names: its very easy to make mistakes or typos. (Remain to save everytime, i once were 2 hours wondering why my code didnt work and I hadnt saved it) Well said, Behemoth RE: Teleporting-Naked-Guy Help - CQBgamer - 07-05-2014 Nope the sound doesnt play, Im thinking it might just be an issue with it triggering as from the checkpoint's function callback. Im making another map ATM and just coding the jumpscare using the same code (Just the jumpscare codes, nothing else) To see if that works. RE: Teleporting-Naked-Guy Help - The chaser - 07-05-2014 Yeah, if the sound doesnt play it must be the callback. Remain to remove any .map_cache if there is. RE: Teleporting-Naked-Guy Help - CQBgamer - 07-05-2014 Wrote a new code on a different map Code: void OnStart () Still doesnt work. |