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:
  • 2 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Piano Scare script
Bors Offline
Junior Member

Posts: 6
Threads: 2
Joined: Feb 2012
Reputation: 0
#1
Piano Scare script

So, i have a problem with a script. (im not getting errors). Dodgy

the script should do like this, the piano plays a song in a loop, but when you enter an a script area it will stop play and it will slam with dust comming.

The music loop works but not the slam and the dust particels. (sorry for bad english) Tongue

So here is the Script=

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

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

void pianostop(string &in asParent, string &in asChild, int alState)
{
StopSound("piano", 0);
RemoveTimer("pianotimer");
SetLeverStuckState("piano", 0, true);
AddPropImpulse("piano", 0, 0, 100, "world");
PlaySoundAtEntity("piano", "break_wood", "piano", 0, false);
CreateParticleSystemAtEntity("", "st_impact.ps", "impact", false);
}

(This post was last modified: 02-04-2012, 05:41 PM by Bors.)
02-04-2012, 05:29 PM
Find


Messages In This Thread
Piano Scare script - by Bors - 02-04-2012, 05:29 PM
RE: Piano Scare script problem. - by S4n1tyM0rs0 - 02-04-2012, 05:41 PM
RE: Piano Scare script problem. - by Bors - 02-04-2012, 05:46 PM
RE: Piano Scare script - by Elven - 02-04-2012, 09:45 PM
RE: Piano Scare script - by Ninami - 02-04-2012, 09:52 PM
RE: Piano Scare script - by Elven - 02-04-2012, 10:03 PM
RE: Piano Scare script - by Ninami - 02-05-2012, 01:20 PM
RE: Piano Scare script - by Elven - 02-05-2012, 02:07 PM
RE: Piano Scare script - by Bors - 02-05-2012, 10:22 PM



Users browsing this thread: 1 Guest(s)