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
Shaky Script
Lizard Offline
Member

Posts: 174
Threads: 23
Joined: Jul 2012
Reputation: 5
#3
RE: Shaky Script

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

PS: i would sugest that you do not use any number higher than 0.4 in float afAmount. I never put the amount higher than 0.3


example

void OnStart()
{
AddEntityCollideCallback("Player", "Name_Of_Area", "Name_Of_Function", true(this deletes the area after collision), 1);
}

void Name_Of_Function(string &in asParent, string &in asChild, int alState)
{
StartScreenShake(0.2, 2, 0, 1);
}

0.2 = the power of the shake
2 = Is how long the shake should last
0 = How long it should take for the shake to reach max shake (0 means max is reached immediately)
1 = How long it should take for screen to be back to normal

CURRENT PROJECT:
A Fathers Secret == Just started
(This post was last modified: 08-03-2012, 12:01 PM by Lizard.)
08-03-2012, 11:38 AM
Find


Messages In This Thread
Shaky Ground - by Brothersvv09 - 08-03-2012, 07:25 AM
RE: Shaky Ground - by Statyk - 08-03-2012, 07:49 AM



Users browsing this thread: 1 Guest(s)