Problems with screenshake - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: Problems with screenshake (/thread-15590.html) |
Problems with screenshake - stevenbocco - 05-23-2012 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 ! RE: Problems with screenshake - Adny - 05-23-2012 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/amnesia/script_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. RE: Problems with screenshake - stevenbocco - 05-23-2012 (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 RE: Problems with screenshake - Adny - 05-23-2012 (05-23-2012, 09:35 PM)stevenbocco Wrote:afAmount is intensity, anything above 1 will make your computer vomit :o (try 0.1f-0.5f)(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 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. RE: Problems with screenshake - stevenbocco - 05-24-2012 (05-23-2012, 09:43 PM)andyrockin123 Wrote: Yes thank you, you made me understand now thanks alot |