The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Why teleportation script doesnt work?
kartanonperuna Offline
Posting Freak

Posts: 755
Threads: 44
Joined: Oct 2011
Reputation: 8
#1
Why teleportation script doesnt work?

Heres the whole script:



////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "guardvoice", "Voicetrigger", true, 1);
AddUseItemCallback("", "stone_hammer_1", "BreakArea", "break1", true);
AddEntityCollideCallback("Player", "VIEW", "Voicetrigger2", true, 1);
AddEntityCollideCallback("Player", "ROT", "Voicetrigger3", true, 1);
SetEntityCallbackFunc("Pot of blood", "BoneSawItem");
}

void Voicetrigger(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "guardconversation4.snt", "whinyguard2", 128, false);
}

void break1(string &in asItem, string &in asEntity)
{
SetEntityActive("breakablewall", false);
SetEntityActive("brokenwall", true);
SetEntityActive("whinyguard3", true);
SetEntityActive("sword", true);
SetEntityActive("block_box_1", true);
SetEntityActive("guardlook", true);
SetEntityActive("brick1", true);
SetEntityActive("brick2", true);
SetEntityActive("brick3", true);
PlaySoundAtEntity("", "away.snt", "Player", 22, false);
SetEntityActive("guardtorch", true);
PlaySoundAtEntity("", "break_wood_metal3", "Player", 1, false);
StartPlayerLookAt("guardlook", 6, 6, "");
AddTimer("look01", 4, "Timer_1");
}

void Timer_1(string &in asTimer)
{
StopPlayerLookAt();
}

void Voicetrigger2(string &in asParent, string &in asChild, int alState)
{
PlayMusic("hall.ogg", true, 1.0f, 1.0f, 1, false);
}

void Voicetrigger3(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "youcanrot.snt", "Player", 16, false);
SetEntityActive("whinyguard4", true);
SetEntityActive("sword2", true);
SetEntityActive("guardtorch2", true);
SetEntityActive("block_box_2", true);
}

void BoneSawItem(string &in asEntity, string &in type)
{
StartScreenShake(1, 1, 1, 1);
AddTimer("Timer_2", (10), "TELEPORT");
AddEntityCollideCallback("Player", "playerteleport", "TELEPORT", true, 1);
FadeOut(10);
}

void TELEPORT(string &in asParent, string &in asChild, int alState)
{
TeleportPlayer("PlayerStartArea_5");
}















////////////////////////////
// Run when entering map
void OnEnter()
{
PlayMusic(".ogg", true, 1.0f, 1.0f, 1, false);
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}




When I put the fade in inside TELEPORT's brackets,it worked.But the teleportation doesnt work...

Voice actor

Painful shadows



02-10-2012, 06:58 AM
Website Find


Messages In This Thread
Why teleportation script doesnt work? - by kartanonperuna - 02-10-2012, 06:58 AM



Users browsing this thread: 1 Guest(s)