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 Custom Music.
Shylia Offline
Junior Member

Posts: 14
Threads: 3
Joined: Jan 2015
Reputation: 0
#1
Music  Custom Music.

So I am trying, just a test to see if I can make a custom sound/music work in the game. Now I followed a guide which told me what to do, where to put the files and stuff. But when I'm done scripting I have no idea why it doesn't work.

Could anyone look into it? And give me some tips?

Thanks!

Here is my script.
VVVVVVVVVVVVVVVVVVVVVVVVVVVVV
Spoiler below!
void OnStart()
{
AddEntityCollideCallback("Player", "Ambience", "Ambience1", true, 1);
}

void Ambience1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "CustomTest.snt", "Player", 0.0f, false);
}

I should also mention this one too.

Spoiler below!
<SOUNDENTITY>
<SOUNDS>
<Main>
<Sound File="CustomTest.ogg" />
</Main>
</SOUNDS>
<PROPERTIES Volume="5" MinDistance="1" MaxDistance="50" Random="0" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="False" Use3D="false" Blockable="False" BlockVolumeMul="0.7" Priority="5" />
</SOUNDENTITY>

ALSO!

If I try to play the OGG file in Windows Mediaplayer I can hear the sound play, but if I try to place the sound in the world in the editor I can't hear it when I try to preview it with the play button, or if I place it in the world and load the map I can't hear the sound play.
(This post was last modified: 01-07-2015, 10:10 AM by Shylia.)
01-07-2015, 10:07 AM
Find


Messages In This Thread
Custom Music. - by Shylia - 01-07-2015, 10:07 AM
RE: Custom Music. - by goodcap - 01-07-2015, 10:47 AM
RE: Custom Music. - by Mudbill - 01-07-2015, 10:52 AM
RE: Custom Music. - by Shylia - 01-07-2015, 11:24 AM
RE: Custom Music. - by Romulator - 01-07-2015, 11:29 AM
RE: Custom Music. - by Shylia - 01-07-2015, 11:33 AM



Users browsing this thread: 1 Guest(s)