Hepl script Amnesia The Dark Descent! - 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: Hepl script Amnesia The Dark Descent! (/thread-22692.html) |
Hepl script Amnesia The Dark Descent! - albertoilmodder - 09-03-2013 Hello everyone, sorry for my english, I'm Italian and I'm creating a mod of amnesia, I need the script of one or more monsters you kill me and I go into a different map, what is it? thanks in advance RE: Hepl script Amnesia The Dark Descent! - lllDash - 09-03-2013 Do you mean you want to be teleported somewhere after a monster kills you? RE: Hepl script Amnesia The Dark Descent! - albertoilmodder - 09-04-2013 yes, I mean that, as I do? RE: Hepl script Amnesia The Dark Descent! - Kullin - 09-04-2013 Try this link http://wiki.frictionalgames.com/hpl2/amnesia/script_functions RE: Hepl script Amnesia The Dark Descent! - lllDash - 09-04-2013 You can try and create a script area at where you normally would re-spawn once you die. In the script file you can get that area to teleport the player when the player collides with that same script area. RE: Hepl script Amnesia The Dark Descent! - albertoilmodder - 09-06-2013 I did not understand. How is the script? RE: Hepl script Amnesia The Dark Descent! - lllDash - 09-07-2013 Create a script area called "ScriptArea_death_1". place the script area on the spot where the player will respawn (the start area should be called "PlayerStartArea_1"). Create another start area called "PlayerStartArea_2" and place that where you want the player to teleport to after the player dies. make sure that "ScriptArea_death_1" is not active, then activate it when the monster spawns. void OnEnter() { AddEntityCollideCallback("Player", "ScriptArea_death_1", "afterdeath", true, 1); } void afterdeath(string &in asParent, string &in asChild, int alState) { TeleportPlayer("PlayerStartArea_2"); } If you want to teleport into a different map then use this instead: void OnEnter() { AddEntityCollideCallback("Player", "ScriptArea_death_1", "afterdeath", true, 1); } void afterdeath(string &in asParent, string &in asChild, int alState) { ChangeMap("name_of_map.map", "PlayerStartArea_1", "", ""); } I tend to make mistakes in my scripts, so if anyone can check this and confirm that this is correct. RE: Hepl script Amnesia The Dark Descent! - albertoilmodder - 09-09-2013 Thank you very much! |