Random Events - 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 (https://www.frictionalgames.com/forum/forum-35.html) +--- Thread: Random Events (/thread-7683.html) |
Random Events - Henriksen - 04-28-2011 Hi. Im currently working a train in the hpl level editor and im wondering if anyone could tell me how to script random events so like that the screen shakes sometimes if you catch my drift RE: Random Events - Dalroc - 04-28-2011 Some more specific info would be nice.. But to make a random screen shake at random intervals you could do something like this PHP Code: void funcName(string &in asTimer) This would make it so there's a 10 percent chance every 60-90 seconds that there will be a screen shake. Just make sure you call "funcName" in the OnStart as well. You can use whatever values you want though. RE: Random Events - Henriksen - 04-28-2011 What do you mean? Could you insert it so it will work in the game when i try to start it? Script: //////////////////////////// // Run first time starting map void OnStart() { } //////////////////////////// // Run when entering map void OnEnter() { } //////////////////////////// // Run when leaving map void OnLeave() { } |