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?
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", true, 1);
}

void StartShaking(string &in asParent, string &in asChild, int alState)
{  
    
SetPlayerMoveSpeedMul(0.35);
    
SetPlayerRunSpeedMul(0);
    
SetPlayerLookSpeedMul(0.5);
    
GiveSanityDamage(25.0f, true);
    
PlayGuiSound("guardian_ontop3.ogg", 0.5f);
    
StartScreenShake( 0.2f, 1.1f, 0.2f, 8.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


Messages In This Thread
RE: How to make screen shaking with sound? - by Slanderous - 02-02-2014, 10:55 PM



Users browsing this thread: 1 Guest(s)