Frictional Games Forum (read-only)

Full Version: Shake screen when entering a map?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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.
(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
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.
(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
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);
}
(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