Frictional Games Forum (read-only)
Death Teleport - 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: Death Teleport (/thread-13610.html)

Pages: 1 2


Death Teleport - Datguy5 - 02-26-2012

When the monster kills the player,i want the player to teleport somewhere.How would i do this?Just like in the real amnesia the part you enter the big place with blue torches on the brigde and 3 grunt come to kill you and then you get teleported into jail.



RE: Death Teleport - Shives - 02-26-2012

I don't really know but maybe you can found the function here
http://wiki.frictionalgames.com/hpl2/amnesia/script_functions



RE: Death Teleport - Datguy5 - 02-26-2012

(02-26-2012, 06:29 PM)Shives Wrote: I don't really know but maybe you can found the function here
http://wiki.frictionalgames.com/hpl2/amnesia/script_functions

Yes i know that page.Ill try searching there.
Didnt find anything that could help : (


RE: Death Teleport - trollox - 02-26-2012

Depends, is it to a different location of the map or to a new one?


RE: Death Teleport - Datguy5 - 02-26-2012

Just like in the real amnesia.Have you played it?Btw you just gave me an idea how it might work.Thanks XD
Here is my idea:When the monster kills you,you spawn in a new area with checkpoints.That should work right?



RE: Death Teleport - Strembitsky - 02-26-2012

Do an if statement if the Player's health is below 10 at a specific area. (Or you could start a timer, re-running this function after you enter an area).

This way, if the player ever gets near death at the point you want him to, it will call a function. You could then make the screen fade with FadeOut, and have him teleport somewhere with the TeleportPlayer command, found somewhere on the wiki. Don't forget to FadeIn afterwards.


RE: Death Teleport - Datguy5 - 02-26-2012

(02-26-2012, 07:50 PM)Strembitsky Wrote: Do an if statement if the Player's health is below 10 at a specific area. (Or you could start a timer, re-running this function after you enter an area).

This way, if the player ever gets near death at the point you want him to, it will call a function. You could then make the screen fade with FadeOut, and have him teleport somewhere with the TeleportPlayer command, found somewhere on the wiki. Don't forget to FadeIn afterwards.
Does it work if i make that the monster kills the player,and then the player spawns in a checkpoint that is still in teh same map but in the different area.





RE: Death Teleport - Strembitsky - 02-26-2012

(02-26-2012, 08:00 PM)Datguy5 Wrote:
(02-26-2012, 07:50 PM)Strembitsky Wrote: Do an if statement if the Player's health is below 10 at a specific area. (Or you could start a timer, re-running this function after you enter an area).

This way, if the player ever gets near death at the point you want him to, it will call a function. You could then make the screen fade with FadeOut, and have him teleport somewhere with the TeleportPlayer command, found somewhere on the wiki. Don't forget to FadeIn afterwards.
Does it work if i make that the monster kills the player,and then the player spawns in a checkpoint that is still in teh same map but in the different area.
I'm sure that there is an UponDeath function, but right now, try that if statement. Maybe even make it so that the if statement checks if the player's health is below 1, that might work.

Also, you could go into Amnesia's hps file and look for the script they used.





RE: Death Teleport - Datguy5 - 02-26-2012

(02-26-2012, 08:52 PM)Strembitsky Wrote:
(02-26-2012, 08:00 PM)Datguy5 Wrote:
(02-26-2012, 07:50 PM)Strembitsky Wrote: Do an if statement if the Player's health is below 10 at a specific area. (Or you could start a timer, re-running this function after you enter an area).

This way, if the player ever gets near death at the point you want him to, it will call a function. You could then make the screen fade with FadeOut, and have him teleport somewhere with the TeleportPlayer command, found somewhere on the wiki. Don't forget to FadeIn afterwards.
Does it work if i make that the monster kills the player,and then the player spawns in a checkpoint that is still in teh same map but in the different area.
I'm sure that there is an UponDeath function, but right now, try that if statement. Maybe even make it so that the if statement checks if the player's health is below 1, that might work.

Also, you could go into Amnesia's hps file and look for the script they used.
The real amnesias hps file is crazy.I cant find anything from there.But i just remembered that i want to have an intro when the player wakes up in a cell you know.How do i do that.Can you help me show me the script and tell me do i need to make a new map etc. :3



RE: Death Teleport - Strembitsky - 02-26-2012

Sorry, I'm not going to hold your hand and give you the script. Trust me, when I was a beginner I wanted to just have the script and continue. But I learned how to script well, and that's where I am now.

Go back through my posts, and think how it would work, and use the wiki.