albertoilmodder
Junior Member
Posts: 29
Threads: 6
Joined: Aug 2013
Reputation:
0
|
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 |
|
lllDash
Member
Posts: 108
Threads: 12
Joined: Apr 2012
Reputation:
3
|
RE: Hepl script Amnesia The Dark Descent!
Do you mean you want to be teleported somewhere after a monster kills you?
|
|
09-03-2013, 03:24 PM |
|
albertoilmodder
Junior Member
Posts: 29
Threads: 6
Joined: Aug 2013
Reputation:
0
|
RE: Hepl script Amnesia The Dark Descent!
yes, I mean that, as I do?
|
|
09-04-2013, 05:52 AM |
|
Kullin
Member
Posts: 218
Threads: 23
Joined: May 2013
Reputation:
3
|
RE: Hepl script Amnesia The Dark Descent!
|
|
09-04-2013, 08:11 AM |
|
lllDash
Member
Posts: 108
Threads: 12
Joined: Apr 2012
Reputation:
3
|
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.
|
|
09-04-2013, 10:20 PM |
|
albertoilmodder
Junior Member
Posts: 29
Threads: 6
Joined: Aug 2013
Reputation:
0
|
RE: Hepl script Amnesia The Dark Descent!
I did not understand. How is the script?
|
|
09-06-2013, 05:48 AM |
|
lllDash
Member
Posts: 108
Threads: 12
Joined: Apr 2012
Reputation:
3
|
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.
|
|
09-07-2013, 11:36 AM |
|
albertoilmodder
Junior Member
Posts: 29
Threads: 6
Joined: Aug 2013
Reputation:
0
|
RE: Hepl script Amnesia The Dark Descent!
Thank you very much!
|
|
09-09-2013, 06:07 AM |
|