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
Scripting help
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#10
RE: Scripting help

(12-05-2011, 01:19 PM)darkadders Wrote:
(12-05-2011, 12:49 PM)flamez3 Wrote:
Quote:void OnStart
{
AddEntityCollideCallback("ScriptArea_1", "Player", "Scare1", false, 1)
}

void Scare1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "sound.snt", "Player", 0, false);
}
You would use that to make a noise play somewhere.

You would need a global.hps file to have a sound playing through out different maps.
AWESOME!! Big Grin thanks a bunch! can i use an mp3 file to play the noise? or do i need to convert it to another format? (snt). do you have a code for playing music? ^^
You have to convert them to a .ogg fiel, than you have to make another file with the same name but with a .snt file extension. And put this in the .snt file


Quote:</properties>

To play music:

Quote:PlayMusic(string& asMusicFile, bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);


Plays music.
asMusicFile - the music to play + extension .ogg
abLoop - determines whether a music track should loop
afVolume - volume of the music
afFadeTime - time in seconds until music reaches full volume
alPrio - priority of the music. Note that only the music with the highest priority can be heard! 0 - highest, 1 - lower, etc

(This post was last modified: 12-05-2011, 01:38 PM by flamez3.)
12-05-2011, 01:37 PM
Find


Messages In This Thread
Scripting help - by Mine Turtle - 12-04-2011, 03:39 PM
RE: Scripting help - by flamez3 - 12-04-2011, 04:12 PM
RE: Scripting help - by GreyFox - 12-04-2011, 04:57 PM
RE: Scripting help - by Mine Turtle - 12-04-2011, 11:08 PM
RE: Scripting help - by flamez3 - 12-04-2011, 11:40 PM
RE: Scripting help - by GreyFox - 12-05-2011, 01:04 AM
RE: Scripting help - by Mine Turtle - 12-05-2011, 12:02 PM
RE: Scripting help - by flamez3 - 12-05-2011, 12:49 PM
RE: Scripting help - by Mine Turtle - 12-05-2011, 01:19 PM
RE: Scripting help - by flamez3 - 12-05-2011, 01:37 PM
RE: Scripting help - by Mine Turtle - 12-05-2011, 08:04 PM
RE: Scripting help - by GreyFox - 12-05-2011, 09:17 PM
RE: Scripting help - by Urakozachok - 12-28-2011, 10:33 AM



Users browsing this thread: 2 Guest(s)