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
Problems with screenshake
stevenbocco Offline
Junior Member

Posts: 28
Threads: 15
Joined: May 2012
Reputation: 0
#1
Problems with screenshake

Hi again,
so i want to make a script with the screen shaking i do know the StartScreenShake,
but i do not know what to write there, can someone write the void StartScreenShake script so i can just copy it into my script i would be please Smile!
(This post was last modified: 05-25-2012, 02:26 PM by stevenbocco.)
05-23-2012, 09:15 PM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#2
RE: Problems with screenshake

This page has the following script, as well as everything you could ever need to script for HPL2, please bookmark it in your browser for future reference. To help navigate the page, you can use "Ctrl+F" to find what you need:

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


I've taken the liberty to search for the desired script for you:

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

Shakes the screen.
afAmount - intensity of the shake
afTime - duration of the shake
afFadeInTime - time in seconds until full intensity is reached
afFadeOutTime - time until screen is back to normal

Also, if you just copy and paste everything, you will never learn; it is like having someone learn to read/write for you. My suggestion is to play with the different scripts and float values (which are decimals) until you become comfortable enough to use it in your story.

I rate it 3 memes.
(This post was last modified: 05-23-2012, 09:28 PM by Adny.)
05-23-2012, 09:26 PM
Find
stevenbocco Offline
Junior Member

Posts: 28
Threads: 15
Joined: May 2012
Reputation: 0
#3
RE: Problems with screenshake

(05-23-2012, 09:26 PM)andyrockin123 Wrote: i understand what you say, it's important that you understand why you are doing what you're doing, but i have "played " around with the script and i do not get the screen to shake Sad
05-23-2012, 09:35 PM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#4
RE: Problems with screenshake

(05-23-2012, 09:35 PM)stevenbocco Wrote:
(05-23-2012, 09:26 PM)andyrockin123 Wrote: i understand what you say, it's important that you understand why you are doing what you're doing, but i have "played " around with the script and i do not get the screen to shake Sad
afAmount is intensity, anything above 1 will make your computer vomit :o (try 0.1f-0.5f)
afTime - how long it lasts (in seconds)
afFadeInTime - How long until the full intensity is achieved (should be approximately 1/3 of the full duration)
afFadeOutTime - How long until it stops again, should be about 1/3 of the full duration.

Note that if the fade in/out times aren't long enough, it will stop very abruptly and seem very jerky in game. Hope that helped. I cannot know for sure how long the event is in game or the desired effect you want, but hopefully that gave you a bit more insight on it. Hopefully these values will make it a bit easier for you.

I rate it 3 memes.
05-23-2012, 09:43 PM
Find
stevenbocco Offline
Junior Member

Posts: 28
Threads: 15
Joined: May 2012
Reputation: 0
#5
RE: Problems with screenshake

(05-23-2012, 09:43 PM)andyrockin123 Wrote: Yes thank you, you made me understand now thanks alot Big Grin
05-24-2012, 07:52 AM
Find




Users browsing this thread: 1 Guest(s)