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
How to make screen shaking with sound?
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#1
How to make screen shaking with sound?

If you've played amnesia the dark descent then you know what I'm talking about! if you remember in the begining of amnesia when you enter the area where there is a oven with a wardrobe/the room where you'll enter after you grabbed the lantern. yeah that room where it will unlock the door after you get the lantern, everything starts to shake and makes a shaking rumble sound, how do I do that? I want to do that in my custom story! thanks Wink
(This post was last modified: 02-01-2014, 08:49 PM by Radical Batz.)
02-01-2014, 08:48 PM
Find
Wapez Offline
Senior Member

Posts: 360
Threads: 37
Joined: Mar 2012
Reputation: 19
#2
RE: How to make screen shaking with sound?

You play a sound and shake the screen, pretty basic. All the functions for this can be found here:

http://wiki.frictionalgames.com/hpl2/amn..._functions

Founder & Legally Accountable Publisher of Red Line Games.
Environment & Gameplay Designer and Scripter.
http://moddb.com/mods/in-lucys-eyes
02-01-2014, 09:32 PM
Find
i3670 Offline
Posting Freak

Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation: 36
#3
RE: How to make screen shaking with sound?

Look for the functions in the original script and "get inspired".

"What you think is irrelevant" - A character of our time

A Christmas Hunt
02-01-2014, 09:47 PM
Find
daortir Offline
Senior Member

Posts: 422
Threads: 9
Joined: Sep 2013
Reputation: 18
#4
RE: How to make screen shaking with sound?

You'll need a Screenshake function to make the screen shake, basically. Then a PlayGuiSound that will play a rumble sound (PlayGuiSound works with .ogg sound files, no need to use any .snt).

Also you will need a AddPropForce to the items ! Shaking the screen and playing the sound are very good, but you want the whole room to shake ! So AddPropForce to the chandeliers, to the details, maybe turn some lights off using SetLampLit.

Also, create some dust particles in the room when the screen shakes !

02-01-2014, 11:27 PM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#5
RE: How to make screen shaking with sound?

(02-01-2014, 09:47 PM)i3670 Wrote: Look for the functions in the original script and "get inspired".
lol.

02-02-2014, 03:23 AM
Find
daortir Offline
Senior Member

Posts: 422
Threads: 9
Joined: Sep 2013
Reputation: 18
#6
RE: How to make screen shaking with sound?

(02-02-2014, 03:23 AM)Amn Wrote:
(02-01-2014, 09:47 PM)i3670 Wrote: Look for the functions in the original script and "get inspired".
lol.

Yeah, it made me laugh my ass off too xD

02-02-2014, 02:10 PM
Find
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#7
RE: How to make screen shaking with sound?

Well, you can use my script if you wish.

Spoiler below!
PHP Code: (Select All)
void OnStart()
{
AddEntityCollideCallback("Player""Scare_1""StartShaking"true1);
}

void StartShaking(string &in asParentstring &in asChildint alState)
{  
    
SetPlayerMoveSpeedMul(0.35);
    
SetPlayerRunSpeedMul(0);
    
SetPlayerLookSpeedMul(0.5);
    
GiveSanityDamage(25.0ftrue);
    
PlayGuiSound("guardian_ontop3.ogg"0.5f);
    
StartScreenShake0.2f1.1f0.2f8.5f);
    
CreateParticleSystemAtEntity("""ps_cave_monster_breath.ps""Ghost_1"true);
    
CreateParticleSystemAtEntity("""ps_cave_monster_breath.ps""Ghost_2"true);
    
AddTimer(""0.7"scared");
}
void scared(string &in asTimer)
{
    
SetEntityActive("skull_1"false);
    
SetEntityActive("skull_2"true);
    
AddTimer(""8.5"scared2");
}
void scared2(string &in asTimer)
{
SetPlayerMoveSpeedMul(1);
SetPlayerRunSpeedMul(1);
SetPlayerLookSpeedMul(1);
ChangePlayerStateToNormal();
SetPlayerActive(true);      


02-02-2014, 10:55 PM
Find




Users browsing this thread: 2 Guest(s)