![]() |
[SCRIPT] Possible to teleport entities to player location upon death? - 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] Possible to teleport entities to player location upon death? (/thread-30306.html) |
Possible to teleport entities to player location upon death? - Streetboat - 07-23-2015 Hi everyone, I was wondering idly if perhaps it would be possible to teleport or activate an entity at the player's location upon a scripted death (i.e. not necessarily needing to detect when it happens, but where)? I know the newest update for HPL2 had a doozy of cool new scripts that were used in AMFP, such as the ability to locate entities and play particle effects there, instead of just a script area. Or maybe that wasn't even that new. Anyways, would this be possible? Or is that still beyond the reaches of HPL2? RE: Possible to teleport entities to player location upon death? - FlawlessHappiness - 07-23-2015 If you have patch 1.3 it sounds fairly easy. If the biggest problem is to move them it should be like this: SetEntityPos("Entity", GetPlayerPosX(), GetPlayerPosY(), GetPlayerPosZ()); RE: Possible to teleport entities to player location upon death? - Spelos - 07-23-2015 Yes, but what exactly would be the trigger. Now I didn't check, but I don't remember there being anything like OnDeath. Maybe I'm wrong, tho. ![]() RE: Possible to teleport entities to player location upon death? - DnALANGE - 07-23-2015 CheckPoint("", "PlayerStartArea_checkpoint", "", "Dead", "Dead"); You know how these work? Check the WIKI page. OR try IfPlayerHealth is less then 1 (some things will happen) Not srue if this work, The checkpoint will. RE: Possible to teleport entities to player location upon death? - FlawlessHappiness - 07-24-2015 (07-23-2015, 11:32 PM)DnALANGE Wrote: OR try IfPlayerHealth is less then 1 (some things will happen) Not srue if this work, The checkpoint will. This is too clumsy. Just use checkpoints. RE: Possible to teleport entities to player location upon death? - Streetboat - 07-24-2015 Like I said, I was just worried about the where, not the when. It's pretty easy to teleport a scriptarea to the player location, kill the player, then teleport a character to that first scriptarea. I'm assuming that scriptareas, since they need to have unique names, can be teleported, of course... EDIT: And yes, I'm familiar with CheckPoints. RE: Possible to teleport entities to player location upon death? - FlawlessHappiness - 07-24-2015 Yup, that sounds possible. RE: Possible to teleport entities to player location upon death? - Mudbill - 07-24-2015 I've never seen Script Areas be moved, though I have no big reason to believe it doesn't work. You should try it. I'm interested to know. RE: Possible to teleport entities to player location upon death? - FlawlessHappiness - 07-24-2015 (07-24-2015, 11:03 AM)Mudbill Wrote: I've never seen Script Areas be moved, though I have no big reason to believe it doesn't work. You should try it. I'm interested to know. I can confirm it works. I helped a guy make a script area follow a monster, with a timer calling every 0.5 second. |