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.)
|