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
Sounds and messages
GoranGaming Offline
Member

Posts: 183
Threads: 30
Joined: Feb 2012
Reputation: 7
#2
RE: Sounds and messages

Jumpscares...

I'll help you anyway:

void Scared_9(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("DeadFour_9", true);
SetEntityActive("DeadFour_10", true);
GiveSanityDamage(99, true);
PlaySoundAtEntity("", "24_iron_maiden.snt", "Scary_9", 0, false);

AddTimer("", 0, "Scared_9Timer");
AddTimer("", 2, "Scared_9SoundAfter");
}


void Scared_9Timer(string &in asTimer)
{
SetMessage("Category", "Entry", 5);
}

void Scared_9SoundAfter(string &in asTimer)
{
PlaySoundAtEntity(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound);



Creates a sound on an entity.



asSoundName - internal name
asSoundFile - the sound to use + extension .snt
asEntity - the entity to create the sound at, can be “Player”
afFadeTime - time in seconds the sound needs to fade. Avoids enemies hearing the sound if afFadeTime is at least 0.1f
abSaveSound - if true, a looping sound will “remember” its playback state (currently playing/stopped), and that state will be restored the next time the level is entered. If true, the sound is never attached to the entity! Note that saving should only be used on looping sounds!


OR



PlayGuiSound(string& asSoundFile, float afVolume);


Plays a sound, not using 3D.
asSoundFile - the sound to play (extension is .snt)
afVolume - the volume of the sound

}

Current projects:

The Dark Prison 85 % (Stopped working on this one)

Unnamed Project 7 %
(This post was last modified: 11-27-2012, 06:19 PM by GoranGaming.)
11-27-2012, 06:10 PM
Website Find


Messages In This Thread
Sounds and messages - by giacomo9 - 11-27-2012, 06:02 PM
RE: Sounds and messages - by GoranGaming - 11-27-2012, 06:10 PM
RE: Sounds and messages - by giacomo9 - 11-27-2012, 06:17 PM
RE: Sounds and messages - by GoranGaming - 11-27-2012, 06:21 PM
RE: Sounds and messages - by giacomo9 - 11-27-2012, 07:19 PM
RE: Sounds and messages - by FlawlessHappiness - 11-27-2012, 07:20 PM
RE: Sounds and messages - by giacomo9 - 11-27-2012, 07:28 PM



Users browsing this thread: 1 Guest(s)