Frictional Games Forum (read-only)

Full Version: area for teleport..
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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...
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); 
sorrybut i don't understand... it's still pitchblack Sad
Then you use FadeIn(3);

Call that when you enter the next level.
...i don't understand...
Put that on the void OnStart when you enter the next level.
i Can't Enter the next level.. i disabled the fade for test but my (Daniel) doesn't Teleport!
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" , "", "");
}
It worked...

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