Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Death Teleport
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#1
Death Teleport

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.

(This post was last modified: 02-27-2012, 11:05 AM by Datguy5.)
02-26-2012, 06:04 PM
Find
Shives Offline
Member

Posts: 154
Threads: 41
Joined: Jan 2012
Reputation: 1
#2
RE: Death Teleport

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

My Custom Story
http://www.frictionalgames.com/forum/thread-12587.html

Sorry for bad English


02-26-2012, 06:29 PM
Find
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#3
RE: Death Teleport

(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/amn..._functions

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

(This post was last modified: 02-26-2012, 06:55 PM by Datguy5.)
02-26-2012, 06:51 PM
Find
trollox Offline
Member

Posts: 215
Threads: 16
Joined: Dec 2011
Reputation: 3
#4
RE: Death Teleport

Depends, is it to a different location of the map or to a new one?
02-26-2012, 07:11 PM
Find
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#5
RE: Death Teleport

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?

(This post was last modified: 02-26-2012, 07:20 PM by Datguy5.)
02-26-2012, 07:19 PM
Find
Strembitsky Offline
Senior Member

Posts: 254
Threads: 37
Joined: Feb 2012
Reputation: 3
#6
RE: Death Teleport

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.

The Nightmares v1.0 - Dreadful Fires WIP
02-26-2012, 07:50 PM
Find
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#7
RE: Death Teleport

(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.



02-26-2012, 08:00 PM
Find
Strembitsky Offline
Senior Member

Posts: 254
Threads: 37
Joined: Feb 2012
Reputation: 3
#8
RE: Death Teleport

(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 Nightmares v1.0 - Dreadful Fires WIP
02-26-2012, 08:52 PM
Find
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#9
RE: Death Teleport

(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

02-26-2012, 09:07 PM
Find
Strembitsky Offline
Senior Member

Posts: 254
Threads: 37
Joined: Feb 2012
Reputation: 3
#10
RE: Death Teleport

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.

The Nightmares v1.0 - Dreadful Fires WIP
02-26-2012, 10:41 PM
Find




Users browsing this thread: 1 Guest(s)