Frictional Games Forum (read-only)

Full Version: Shadow
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How to make shadow(net) active with fade screen and sound guardian_activated?
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,
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
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);
}