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
script
Shift421 Offline
Junior Member

Posts: 4
Threads: 2
Joined: Jun 2012
Reputation: 0
#1
script

can anyone see if there are any errors in this script? i want a piano to play then stop when the player gets near.




OnStart()
{
AddTimer("pianotimer", 0, "pianotimer");
AddEntityCollideCallback("player", "pianostop", "pianostop", true, 1);
}


void pianotimer(string &in asTimer)
{
PlaySoundAtEntity("piano", "general_piano03.snt", "piano", 0, false);
AddTimer("pianotimer", 18, "pianotimer");
}

void pianostop(string &in asParent, string &in asChild, int alState)
{
StopSound("piano", 0);
RemoveTimer("pianotimer");
}
06-18-2012, 04:50 AM
Find


Messages In This Thread
script - by Shift421 - 06-18-2012, 04:50 AM
RE: script - by Damascus - 06-18-2012, 04:56 AM



Users browsing this thread: 2 Guest(s)