Frictional Games Forum (read-only)
Shadow - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Shadow (/thread-18017.html)



Shadow - Ank2503 - 08-29-2012

How to make shadow(net) active with fade screen and sound guardian_activated?


RE: Shadow - FlawlessHappiness - 08-29-2012

What do you mean exactly? Do you want the screen to go black? Want the slime-net to fade in as an activation?

if you want the slime to fade in, then make it 'inactive' in the editor, and then use the function:
SetPropActiveAndFade(string& asName, bool abActive, float afFadeTime);

if you want to fade out black, and then fade in again, then you should use:

FadeOut(0);
AddTimer("FadeIn_1", 2, "FadeIn_1");

then add another timer

void FadeIn_1(string &in asTimer)
{
FadeIn(2);
}


Playing sound effects are pretty easy... You should have tried it before, but here is the script:
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 - determines whether a sound should “remember” its state. If true, the sound is never attached to the entity! Also note that saving should on be used on looping sounds!


Also: The shadow sound is called: guardian_activated, guardian_distant, guardian_distant1, guardian_distant2, guardian_distant3,


RE: Shadow - Ank2503 - 08-29-2012

ok,i try it
"What do you mean exactly? Do you want the screen to go black? Want the slime-net to fade in as an activation?" when screen go black slime-net is activating


RE: Shadow - FlawlessHappiness - 08-29-2012

Then i would use something like

void FadeOut_1(string &in asParent, string &in asChild, int alState) <- this is a collide function
{
FadeOut(0);
SetEntityActive("SLIME", true);
AddTimer("FadeIn_1", 2, "FadeIn_1");
}

FadeIn_1(string &in asTimer)
{
FadeIn(2);
}