Frictional Games Forum (read-only)
Brute collides area, Player changes level - 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: Brute collides area, Player changes level (/thread-15974.html)



Brute collides area, Player changes level - MaZiCUT - 06-08-2012

Hello i've been making quite the threads today but it is cause i am under heavy scripting of my custom story to make it as fun and enjoyable as possible.


Anyways i've set up pathnodes and an area called BruteCollides so the brute goes through it cause it's in his pathnode and when he collides i want the player to fade out into a black screen and then change level to a map called "Outside.map"




Thanks for reading and thanks for all the help i get








RE: Brute collides area, Player changes level - Traggey - 06-08-2012

Please post these threads under development support, moved.


RE: Brute collides area, Player changes level - MaZiCUT - 06-08-2012

(06-08-2012, 07:47 PM)Traggey Wrote: Please post these threads under development support, moved.
Sorry i'm new around the forums.

bump D:


RE: Brute collides area, Player changes level - lllDash - 06-08-2012

When the monster collides into an area, use the ChangeMap function

eg:
{
ChangeMap("NAME OF MAP", "PlayerStartArea_1", "", "");

}

Yes it's that simple.Tongue


RE: Brute collides area, Player changes level - Ermu - 06-09-2012

(06-08-2012, 07:47 PM)CrazyArts Wrote: Anyways i've set up pathnodes and an area called BruteCollides so the brute goes through it cause it's in his pathnode and when he collides i want the player to fade out into a black screen and then change level to a map called "Outside.map"
void OnStart
{
AddEntityCollideCallback("brutenamehere", "BruteCollides", "BruteCollides", true, 1);
}


void BruteCollides(string &in asParent, string &in asChild, int alState)
{
FadeOut(3);
AddTimer("", 3, ""ChangeLevel");
}


void ChangeLevel(string &in asTimer)
{
ChangeMap("Outside.map", "PlayerStartPositionHere", "OPTIONALSoundToPlayWhenLeavingMap.snt", "OPTIONALSoundToPlayWhenEnteringNextMap.snt");
}