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 Delay sound from playing
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#4
RE: Delay sound from playing

Not quite there. Let's take a look:

PHP Code: (Select All)
void TimerFunction("PlaySound")
{
     
RunScript("PlaySoundAtEntity(string &in asTimer""insanity_imageflash01.snt""Player"1false);



Notice that in my example, I left the constructor (which is the line that starts with void) with the part you usually see on the engine scripts page. That's because that's how they must be. Don't edit that. If you see on the script page, it says callback syntax beneath AddTimer. Basically copy/paste that into your script (as long as the name matches).

I just did RunScript(); as an example. RunScript(); doesn't do anything, neither does it exist at the moment. This is where you want to put your own. Replace RunScript(); with whatever you want to run.

It should look more like this:

PHP Code: (Select All)
void TimerFunction(string &in asTimer)
{
     
PlaySoundAtEntity("""insanity_imageflash01.snt""Player"1false);


If you look closely at the wakeUp() script you have, it features a timer called beginStory().

(This post was last modified: 02-03-2015, 06:22 PM by Mudbill.)
02-03-2015, 06:20 PM
Find


Messages In This Thread
Delay sound from playing - by LDOriginal - 02-03-2015, 03:55 PM
RE: Delay sound from playing - by Mudbill - 02-03-2015, 04:06 PM
RE: Delay sound from playing - by LDOriginal - 02-03-2015, 04:46 PM
RE: Delay sound from playing - by Mudbill - 02-03-2015, 06:20 PM
RE: Delay sound from playing - by LDOriginal - 02-03-2015, 07:14 PM
RE: Delay sound from playing - by LDOriginal - 02-04-2015, 11:50 PM



Users browsing this thread: 1 Guest(s)