Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Shake screen when entering a map?
Wrathborn771 Offline
Junior Member

Posts: 45
Threads: 10
Joined: Jun 2012
Reputation: 0
#1
Question  Shake screen when entering a map?

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
(This post was last modified: 07-12-2012, 08:11 PM by Wrathborn771.)
07-12-2012, 05:30 PM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#2
RE: Shake screen when entering a map?

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.

I rate it 3 memes.
07-12-2012, 05:35 PM
Find
Wrathborn771 Offline
Junior Member

Posts: 45
Threads: 10
Joined: Jun 2012
Reputation: 0
#3
RE: Shake screen when entering a map?

(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
07-12-2012, 06:05 PM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#4
RE: Shake screen when entering a map?

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.

I rate it 3 memes.
07-12-2012, 06:34 PM
Find
Wrathborn771 Offline
Junior Member

Posts: 45
Threads: 10
Joined: Jun 2012
Reputation: 0
#5
RE: Shake screen when entering a map?

(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
07-12-2012, 06:47 PM
Find
ApeCake Offline
Member

Posts: 116
Threads: 20
Joined: Jun 2012
Reputation: 4
#6
RE: Shake screen when entering a map?

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
Find
Wrathborn771 Offline
Junior Member

Posts: 45
Threads: 10
Joined: Jun 2012
Reputation: 0
#7
RE: Shake screen when entering a map?

(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
07-12-2012, 09:05 PM
Find




Users browsing this thread: 1 Guest(s)