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
Hepl script Amnesia The Dark Descent!
albertoilmodder Offline
Junior Member

Posts: 29
Threads: 6
Joined: Aug 2013
Reputation: 0
#1
Hepl script Amnesia The Dark Descent!

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
09-03-2013, 06:44 AM
Find
lllDash Offline
Member

Posts: 108
Threads: 12
Joined: Apr 2012
Reputation: 3
#2
RE: Hepl script Amnesia The Dark Descent!

Do you mean you want to be teleported somewhere after a monster kills you?

My Custom Story: KEY TO FREEDOM: http://www.moddb.com/mods/key-to-freedom
09-03-2013, 03:24 PM
Find
albertoilmodder Offline
Junior Member

Posts: 29
Threads: 6
Joined: Aug 2013
Reputation: 0
#3
RE: Hepl script Amnesia The Dark Descent!

yes, I mean that, as I do?
09-04-2013, 05:52 AM
Find
Kullin Offline
Member

Posts: 218
Threads: 23
Joined: May 2013
Reputation: 3
#4
RE: Hepl script Amnesia The Dark Descent!

Try this link http://wiki.frictionalgames.com/hpl2/amn..._functions
09-04-2013, 08:11 AM
Find
lllDash Offline
Member

Posts: 108
Threads: 12
Joined: Apr 2012
Reputation: 3
#5
RE: Hepl script Amnesia The Dark Descent!

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.

My Custom Story: KEY TO FREEDOM: http://www.moddb.com/mods/key-to-freedom
09-04-2013, 10:20 PM
Find
albertoilmodder Offline
Junior Member

Posts: 29
Threads: 6
Joined: Aug 2013
Reputation: 0
#6
RE: Hepl script Amnesia The Dark Descent!

I did not understand. How is the script?
09-06-2013, 05:48 AM
Find
lllDash Offline
Member

Posts: 108
Threads: 12
Joined: Apr 2012
Reputation: 3
#7
RE: Hepl script Amnesia The Dark Descent!

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.

My Custom Story: KEY TO FREEDOM: http://www.moddb.com/mods/key-to-freedom
09-07-2013, 11:36 AM
Find
albertoilmodder Offline
Junior Member

Posts: 29
Threads: 6
Joined: Aug 2013
Reputation: 0
#8
RE: Hepl script Amnesia The Dark Descent!

Thank you very much!
09-09-2013, 06:07 AM
Find




Users browsing this thread: 2 Guest(s)