Shake Function - 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: Shake Function (/thread-26280.html) |
Shake Function - Carlos2295 - 09-23-2014 Hi there, I was working on a custom story and I was wondering how I would make the screen shake, sort of like when the shadow roars. I used the wiki and made this code, however, it doesn't work when run. Any suggestions would be really appreciated. Here's what I've got so far: PHP Code: void OnStart() RE: Shake Function - FlawlessHappiness - 09-23-2014 The reason it's not working is because you're not calling the function "ShakeFunction" anywhere. IGNORE THIS! READ MUDBILL'S ANSWER INSTEAD Spoiler below!
RE: Shake Function - Mudbill - 09-23-2014 Because your ShakeFunction is a collision callback, you need the proper parameters to match, or else it's not recognized. This is written in the syntax below the collide function on the script page. PHP Code: void ShakeFunction(string &in asParent, string &in asChild, int alState) RE: Shake Function - FlawlessHappiness - 09-23-2014 (09-23-2014, 07:07 AM)Mudbill Wrote: Because your ShakeFunction is a collision callback, you need the proper parameters to match, or else it's not recognized. This is written in the syntax below the collide function on the script page. Oh right! haha I didn't see that it was a collision callback! Good catch RE: Shake Function - Mudbill - 09-23-2014 ^ Hehe, I almost feel like I'm competing with you here these days xD |