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 Help Sounds don't play
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#1
Sounds don't play

Hello everyone!

So, I needed to make some random wind, to add ambience. The beggining code worked pretty well, but the same sound got repeated over and over again. I made a RandInt system but the windysound_+Int don't work.


void OnStart()
{
AddTimer("", 1, "Wind");
}


void Wind (string &in asTimer)
{
AddTimer("", 0.1, "Windy");
PlaySoundAtEntity("wind_amb", "wind_amb.snt", "", 1.f, false);
}

void Windy (string &in asTimer)
{
CreateParticleSystemAtEntity("", "ps_dust_whirl", "Windy_"+RandInt(1, 7), false);
"windysound_"+RandInt(1, 3);
AddTimer("", RandInt(1.0, 7.0), "Windy");
}

void windysound_1 ()
{
PlaySoundAtEntity("", "scare_wind.snt", "Windy_"+RandInt(1, 7), 0.f, false);
}

void windysound_2 ()
{
PlaySoundAtEntity("", "scare_wind_reverse.snt","Windy_"+RandInt(1, 7), 0.f, false);
}

void windysound_3 ()
{
PlaySoundAtEntity("", "general_wind_whirl_rand.snt", "Windy_"+RandInt(1, 7), 0.f, false);
}

What could be wrong?
Thanks in advance Big Grin

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
12-12-2012, 09:38 PM
Find


Messages In This Thread
Sounds don't play - by The chaser - 12-12-2012, 09:38 PM
RE: Sounds don't play - by Juby - 12-12-2012, 09:57 PM
RE: Sounds don't play - by The chaser - 12-12-2012, 10:15 PM
RE: Sounds don't play - by FlawlessHappiness - 12-12-2012, 10:45 PM
RE: Sounds don't play - by The chaser - 12-12-2012, 10:58 PM
RE: Sounds don't play - by FlawlessHappiness - 12-13-2012, 07:02 AM
RE: Sounds don't play - by The chaser - 12-13-2012, 07:48 AM
RE: Sounds don't play - by JMFStorm - 12-13-2012, 07:56 AM
RE: Sounds don't play - by The chaser - 12-13-2012, 10:17 AM
RE: Sounds don't play - by FlawlessHappiness - 12-13-2012, 10:50 AM
RE: Sounds don't play - by The chaser - 12-13-2012, 02:50 PM
RE: Sounds don't play - by TheGreatCthulhu - 12-17-2012, 01:40 PM
RE: Sounds don't play - by The chaser - 12-17-2012, 08:34 PM
RE: Sounds don't play - by TheGreatCthulhu - 12-19-2012, 10:02 AM
RE: Sounds don't play - by TheGreatCthulhu - 12-19-2012, 08:07 PM
RE: Sounds don't play - by The chaser - 12-19-2012, 09:33 PM
RE: Sounds don't play - by TheGreatCthulhu - 12-19-2012, 10:45 PM



Users browsing this thread: 4 Guest(s)