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
Whats wrong with my script?
Henriksen Offline
Senior Member

Posts: 308
Threads: 71
Joined: Dec 2010
Reputation: 2
#1
Whats wrong with my script?

Hi, I cant see whats wrong with me script but it doesnt work ingame. I get a error Tongue

Script:

////////////////////////////
// Run first time starting map
void OnStart()
{
SetEntityPlayerInteractCallback("", "OpenCurtain", true);
SetEntityPlayerInteractCallback("", "Sleep", true);
SetEntityPlayerInteractCallback("", "StartConversation", true);
}

void StartConversation(string &in asEntity)
{
SetPlayerActive(false);
FadeOut(1);
AddTimer("", 2.0f, "TeleToDesk");
AddTimer("", 3.0f, "FadeToDesk");
}

void TeleToDesk(string &in asTimer)
{
AddTimer("", 2.0f, "InnkeeperHello");
SetEntityActive("block_box_1", true);
SetEntityActive("block_box_2", true);
SetEntityActive("block_box_3", true);
SetEntityActive("block_box_4", true);
SetEntityActive("StartConversation", false);
SetPlayerActive(true);
TeleportPlayer("PlayerStartArea_3");
}

void InnkeeperHello(string &in asTimer)
{
AddTimer("", 3.0f, "InnkeeperWhatDoYouWant");
SetMessage("TheInnkeeper", "Hello", 0);
}

void InnkeeperWhat(string &in asTimer)
}
SetMessage("TheInnkeeper", "What", 0);
}

void FadeToDesk(string &in asTimer)
{
FadeIn(3);
}

void Sleep(string &in asEntity)
{
SetPlayerActive(false);
FadeOut(1);
AddTimer("", 2.0f, "Tele");
AddTimer("", 3.0f, "SleepNow");
}

void Tele(string &in asTimer)
{
TeleportPlayer("PlayerStartArea_2");
}

void SleepNow(string &in asTimer)
{
FadeIn(1);
MovePlayerHeadPos(1.7, 0.03, 0.0, 0.5, 0.2);
AddTimer("", 6.0f, "Look1");
}

void Look1(string &in asTimer)
{
FadeOut(3);
}

void OpenCurtain(string &in asEntity)
{
FadeOut(1);
AddTimer("", 3.0f, "ActuallyOpen");
AddTimer("", 2.0f, "TheyAreOpen");
}

void TheyAreOpen(string &in asEntity)
{
SetEntityActive("curtain01_closed_1", false);
SetEntityActive("curtain01_open_1", true);
SetEntityActive("OpenCurtains", false);
}

void ActuallyOpen(string &in asTimer)
{
FadeIn(1);
}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

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

}
09-10-2011, 05:07 PM
Find


Messages In This Thread
Whats wrong with my script? - by Henriksen - 09-10-2011, 05:07 PM
RE: Whats wrong with my script? - by Darion97 - 09-10-2011, 06:10 PM
RE: Whats wrong with my script? - by Henriksen - 09-10-2011, 06:11 PM
RE: Whats wrong with my script? - by Darion97 - 09-10-2011, 06:19 PM
RE: Whats wrong with my script? - by Henriksen - 09-11-2011, 12:21 PM
RE: Whats wrong with my script? - by Darion97 - 09-11-2011, 01:53 PM
RE: Whats wrong with my script? - by Henriksen - 09-11-2011, 02:10 PM
RE: Whats wrong with my script? - by Darion97 - 09-11-2011, 02:21 PM



Users browsing this thread: 1 Guest(s)