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
How to script sounds
Khan Offline
Member

Posts: 61
Threads: 12
Joined: Aug 2011
Reputation: 0
#3
RE: How to script sounds

(08-18-2011, 03:16 PM)zeravia Wrote:
(08-18-2011, 02:49 PM)Khan Wrote: I was wondering, wat is the script for triggering sounds? I cant seem to find it anywhere, if there is a script, wat exactly do I need to do to get get a sound to play?

isint it this?

void PlaySoundAtEntity(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound);


Ok, so like, when you place down a sound thing in game, and pick a sound to play, do you need to script that? And make an area for the player to walk into to triger it? And if so, exactly wat would that script be, lets say I pick something like "Prisoner_Scream" how would I script that into an area and make it go off when I hit that area?


Im thinking (this my fail noob script skills) I make a Player colide, name it all that stuff, then make a void function with the same thing you have? so something like this?

Void OnEnter()
{
AddEntityCollideCallback("Player", "sound_area1", "prisoner_scream", true, 1);
}
void prisoner_scream(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound);
{
Void Onleave()
{

}


Would that be wat Im trying to do? Or did I just make some complete failure BS that will crash mygame? lol
(This post was last modified: 08-18-2011, 03:48 PM by Khan.)
08-18-2011, 03:43 PM
Find


Messages In This Thread
How to script sounds - by Khan - 08-18-2011, 02:49 PM
RE: How to script sounds - by zeravia - 08-18-2011, 03:16 PM
RE: How to script sounds - by Khan - 08-18-2011, 03:43 PM
RE: How to script sounds - by zeravia - 08-18-2011, 04:02 PM
RE: How to script sounds - by Kyle - 08-18-2011, 04:07 PM
RE: How to script sounds - by Kyle - 08-18-2011, 04:01 PM



Users browsing this thread: 1 Guest(s)