Frictional Games Forum (read-only)
area for 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: area for teleport.. (/thread-25568.html)

Pages: 1 2


RE: area for teleport.. - Amnesiaplayer - 06-27-2014

yes the area thing is

x:10,25
y:60
z:11,5

i thougt he must be IN the area Dx
and yes he is TOUCHING the area and my script looks like this for now


PHP Code:
void OnLeave()
{
 
FadeIn(1);
}

void OnStart()
{
AddUseItemCallback("""sleutel1""deur1""UsedKeyOnDoor"true);
AddEntityCollideCallback("Player""BreakingArea""BoardCreak"true1);
AddEntityCollideCallback("Player""Hittheground""Teleport"true1); 
}

void UsedKeyOnDoor (string &in asItemstring &in asEntity)
{
SetSwingDoorLocked("deur1"falsetrue); 
PlaySoundAtEntity("""unlock_door.snt""deur1"0false);
RemoveItem("sleutel1");


void BoardCreak(string&in asParentstring &in asChildint alState)
{
PlaySoundAtEntity("WoodCreaking""CREAKINGNOISE.snt""BreakingArea"0.5ffalse);
AddTimer("ImFaaaalling"0.60f"StartFalling");
}

void StartFalling(string &in asTimer)
{
SetPropHealth("Board"0);
FadeOut(3);


void Teleport(string &in asParentstring &in asChildint alState)
{
ChangeMap("dream.map""PlayerStartArea_dream" """");


but it doesn't stop with the Black screen Sad i did what yo usaid but...


RE: area for teleport.. - DnALANGE - 06-27-2014

Try this :

void BoardCreak(string&in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("WoodCreaking", "CREAKINGNOISE.snt", "BreakingArea", 0.5f, false);
AddTimer("ImFaaaalling", 1, "StartFalling");
}

void StartFalling(string &in asTimer)
{
SetPropHealth("Board", 0);
FadeOut(3);
AddTimer("", 3, "Teleport");
}

void Teleport(string &in asTimer)
{
ChangeMap("dream.map", "PlayerStartArea_dream" , "", "");
}

Remove this line or easely do
PHP Code:
//AddEntityCollideCallback("Player", "Hittheground", "Teleport", true, 1); 



RE: area for teleport.. - Amnesiaplayer - 06-27-2014

sorrybut i don't understand... it's still pitchblack Sad


RE: area for teleport.. - Neelke - 06-27-2014

Then you use FadeIn(3);

Call that when you enter the next level.


RE: area for teleport.. - Amnesiaplayer - 06-27-2014

...i don't understand...


RE: area for teleport.. - Neelke - 06-27-2014

Put that on the void OnStart when you enter the next level.


RE: area for teleport.. - Amnesiaplayer - 06-27-2014

i Can't Enter the next level.. i disabled the fade for test but my (Daniel) doesn't Teleport!


RE: area for teleport.. - Neelke - 06-27-2014

Why don't you use the script DnaLANGE sent you? This here:

Code:
void BoardCreak(string&in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("WoodCreaking", "CREAKINGNOISE.snt", "BreakingArea", 0.5f, false);
AddTimer("ImFaaaalling", 1, "StartFalling");
}

void StartFalling(string &in asTimer)
{
SetPropHealth("Board", 0);
FadeOut(3);
AddTimer("", 3, "Teleport");
}

void Teleport(string &in asTimer)
{
ChangeMap("dream.map", "PlayerStartArea_dream" , "", "");
}



RE: area for teleport.. - Amnesiaplayer - 06-27-2014

It worked...

i removed the Hittheground and typed (Teleport) now it works Big Grin
now i'm gonna put the Fade back! thankyou... all