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
Mine Turtle Offline
Senior Member

Posts: 647
Threads: 32
Joined: Mar 2011
Reputation: 29
#11
RE: Scripting help

(12-05-2011, 01:37 PM)flamez3 Wrote:
(12-05-2011, 01:19 PM)darkadders Wrote: [quote='flamez3' pid='103884' dateline='1323085779']

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? ^^


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


do i put this in the actual scriptfile of the map? or do i put it in the .snt file? ^^
12-05-2011, 08:04 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: 1 Guest(s)