Frictional Games Forum (read-only)
Shake screen when entering a map? - 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: Shake screen when entering a map? (/thread-16915.html)



Shake screen when entering a map? - Wrathborn771 - 07-12-2012

Hey all sexy peepz :3


I'm just wondering if there's a script for the screen to "shake" when entering a map?
I mean, like when the red, weird pulsating things spawn in the main story?

Cheers
-Jonathan


RE: Shake screen when entering a map? - Adny - 07-12-2012

StartScreenShake(float afAmount, float afTime, float afFadeInTime, float afFadeOutTime);

Is what you're looking for. afAmount is the intensity of the shake; do not exceed 0.5f unless you plan on giving people seizures. afTime is how long it lasts; afFadeIn/FadeOut determine how long the screen shakes until it reaches the max effect.

Hope that helped.


RE: Shake screen when entering a map? - Wrathborn771 - 07-12-2012

(07-12-2012, 05:35 PM)andyrockin123 Wrote: StartScreenShake(float afAmount, float afTime, float afFadeInTime, float afFadeOutTime);

Is what you're looking for. afAmount is the intensity of the shake; do not exceed 0.5f unless you plan on giving people seizures. afTime is how long it lasts; afFadeIn/FadeOut determine how long the screen shakes until it reaches the max effect.

Hope that helped.
Sorry, I'm really awful at scripting D:
Could you help me with it?
I want it to shake for 3 seconds, is that possible?
Thanks


RE: Shake screen when entering a map? - Adny - 07-12-2012

StartScreenShake(0.05f, 3.0f, 1.0f, 1.0f);

There you go. If you need to, change the intensity its the number 0.05f; I have not tested how it will look in game, but that amount should be fine.


RE: Shake screen when entering a map? - Wrathborn771 - 07-12-2012

(07-12-2012, 06:34 PM)andyrockin123 Wrote: StartScreenShake(0.05f, 3.0f, 1.0f, 1.0f);

There you go. If you need to, change the intensity its the number 0.05f; I have not tested how it will look in game, but that amount should be fine.
Thanks man, Imma try it out right now Smile
You're a real life saver Big Grin


RE: Shake screen when entering a map? - ApeCake - 07-12-2012

To make the screen (dark)red, you can use FadeSepiaColorTo(float afAmount, float afSpeed);

afAmount is the intensity, 0-1. (Like the shake)
afSpeed is the time in seconds until full effect occurs.
Example;
void OnStart()
{
FadeSepiaColorTo(0.75, 3);
}



RE: Shake screen when entering a map? - Wrathborn771 - 07-12-2012

(07-12-2012, 08:34 PM)ApeCake Wrote: To make the screen (dark)red, you can use FadeSepiaColorTo(float afAmount, float afSpeed);

afAmount is the intensity, 0-1. (Like the shake)
afSpeed is the time in seconds until full effect occurs.
Example;
void OnStart()
{
FadeSepiaColorTo(0.75, 3);
}
Cool! I'll try it! Smile